/***************************************************************************
*			Title: STYL Cleaningdofile
*			Output:
*			Date:
****************************************************************************/

// DESTRING


// OUTSTANDING
	* Review  disabledspecify_b_1

// DROP VARIBLES
	drop g2_b softstart_e rmsecon1_e g2_e beginlit_e dgstart_e
	drop cvtext1_e
	drop repartid_e
// 	drop partidlookup_e intromaze_e introarrow_e  glastname_e gfirstname_e
	drop partidlookup_e intromaze_e introarrow_e
	drop partidcheck_b
// 	drop stylidname_e
	drop nvnormtext1_e nvnormtext2_e

*time_hyp_mnygm1_b
*time_hyp_mnygm3_b
*time_hyp_mnygm2_b     time_hyp_mnygm4_b time_hyp_mnygm5_b time_hyp_mnygm6_b
*enumerator_e
*lottotpcolorchipselect_e
*famconcern_b


*SHOULD BE NUMERIC
*debtfriends_b
*handgrip2ms_e


 *TO FIX
*commchangewhy_b
*adddrugntgrsssick_b
*famconcern_b
*lottotpcolorchipselect_e
*grantcheck_e
*addboozesmallmore_e
*foodckshpfufu3dx_e
*addboozetoler_e
*fine2w_e

// CLEAN ACCORDING SKIP PATTERNS
	* Move back to individual dofiles


// MISC CLEANING
	* Move back to individual dofiles

	replace bas_feelstrongly_b = "2-Agree" if bas_feelstrongly_b =="2-Agree7"
	replace bas_feelstrongly_e = "3-Disagree" if bas_feelstrongly_e =="3-Disagree8"
	replace bas_feelstrongly_e = "2-Agree" if bas_feelstrongly_e =="2-Agree8"
	replace bas_feelstrongly_e = "2-Agree" if bas_feelstrongly_e =="Agree"
	replace bas_feelstrongly_e = "2-Agree" if bas_feelstrongly_e =="92-Agree"
	replace bas_feelstrongly_e = "2-Agree" if bas_feelstrongly_e =="82-Agree"
	replace bas_feelstrongly_e = "4-Really Disagree" if bas_feelstrongly_e =="84-Really Disagree"
	replace gage_b = "" if gage_b=="ERROR"
	replace gage_b = "" if gage_b=="N/A"
	replace shop2w2_e  ="N" if shop2w2_e == "N9"
	replace g9h_e="99-Not applicable" if g9h_e=="99-Missing"
	replace g10d_e="99-Not Applicable" if g10d_e=="99-Missing"
	replace g10e_e="99-Not Applicable" if g10e_e=="99-Missing"
	replace time_hyp_mnygm1_b="2-150 in 1 week" if time_hyp_mnygm1_b=="2-150 later"
	replace time_hyp_mnygm3_b="2-300 in 1 week" if time_hyp_mnygm3_b=="2-300 later"
	replace time_hyp_mnygm4_b="2-100 in 1 week" if time_hyp_mnygm4_b=="2-100 later"


// HARMONIZE VARIABLE WITH DIFFERENT ANSWER OPTIONS AT DIFFERENT SURVEY ROUND

	* Addiction
		* E, S, O, N
		tab1 addboozeprob_e adddruggrassprob_e adddrugntgrssprob_e
		tab1 addboozeprob_b adddruggrassprob_b adddrugntgrssprob_b
		* Yes No: change addboozetoler_e addboozetoler_b
		tab1 addboozetoler_e adddruggrasstoler_e adddrugntgrsstoler_e
		tab1 addboozetoler_b adddruggrasstoler_b adddrugntgrsstoler_b
		* Yes No
		tab1 addboozecantstop_e adddruggrasscantstop_e adddrugntgrsscantstop_e
		tab1 addboozecantstop_b adddruggrasscantstop_b adddrugntgrsscantstop_b
		* Yes No: change  adddrugntgrsssick_b
		tab1 addboozesick_e adddruggrasssick_e adddrugntgrsssick_e
		tab1 addboozesick_b adddruggrasssick_b adddrugntgrsssick_b
		* Yes No: change addboozesmallmore_e addboozesmallmore_b
		tab1 addboozesmallmore_e
		tab1 addboozesmallmore_b

	foreach x in addboozetoler_e addboozetoler_b adddrugntgrsssick_b addboozesmallmore_e addboozesmallmore_b {
		replace `x' = "1-Yes" if `x' =="1-Everytime" | `x' =="2-Sometimes" | `x' =="3-One one time"
		replace `x' = "0-No" if `x' =="4-Never"
	}

// SPLIT ALL THE MULTISELECTION LISTS

	foreach var in  drugsellselfspecify_e tpencouragewho_e ccldistract_e drugntgrssspecify_b drugntgrssfriendsspecify_b drugseverspecify_b   drugsellfriendsspecify_b  drugsellselfspecify_b  tempt1b_b ///
		tempt2b_b tempt3b_b stealweaponspecify_b steallastwhat_b stealhow_b   ccldistract_b granttellwho_e lottotpdes_e tpabsences_e   tpcounselwho_e ///
		grantrecdtoldwho_e drugntgrssspecify_e drugtabletspecify_e drughardspecify_e stealweaponspecify_e steallastwhat_e    votepaidrallyparty_e carryweaponkind_e ///
		handouttrain_e handoutstuff_e icconfhear_e vote2011knowcandidates_e  voinfohow_e voinfo7nov2011how_e disabledspecify_b    {
		ren `var' `var'_
		split `var'_, parse(;)
		ren `var'_ `var'

		foreach y of varlist `var'_*  {
			move `y' `var'
		}
	}


// GET RID OF THE CAPITAL AND BLANKS IN ANSWER OPTIONS TO MAKE THE CLEANING EASIER

	foreach var of varlist stealhustle_b time_hyp_100nowvs10x12_b gamblefreq_b drugsellselfspecify_e_* drugsellselfspecify_b_* steallastwhat_b_1 steallastwhat_b_2 steallastwhat_b_3 steallastwhat_b_4 steallastwhat_b_5 steallastwhat_b_6 steallastwhat_b_7 steallastwhat_b_8 stealhow_b_1   ///
		stealhow_b_2 ccldistract_b_1 ccldistract_b_2 ccldistract_b_3 ccldistract_b_4 granttellwho_e_1 granttellwho_e_2 granttellwho_e_3 granttellwho_e_4 granttellwho_e_5   ///
		granttellwho_e_7 lottotpdes_e_1 lottotpdes_e_2 lottotpdes_e_4 lottotpdes_e_5 lottotpdes_e_6 lottotpdes_e_7 tpabsences_e_1 tpabsences_e_2 tpcounselwho_e_1   ///
		tpcounselwho_e_3 tpcounselwho_e_4 grantrecdtoldwho_e_1 grantrecdtoldwho_e_2 grantrecdtoldwho_e_3 grantrecdtoldwho_e_4 drugntgrssspecify_e_1 drugntgrssspecify_e_2   ///
		drugntgrssspecify_e_3 drugntgrssspecify_e_5 drugntgrssspecify_e_7 drugntgrssspecify_e_6 drugtabletspecify_e_1 drugtabletspecify_e_2 drughardspecify_e_1   ///
		drughardspecify_e_2 drughardspecify_e_3 stealweaponspecify_e_1 stealweaponspecify_e_2 stealweaponspecify_e_3 stealweaponspecify_e_4 steallastwhat_e_1    ///
		steallastwhat_e_2 steallastwhat_e_3 votepaidrallyparty_e_1 votepaidrallyparty_e_2 carryweaponkind_e_1 carryweaponkind_e_2 handouttrain_e_1 handouttrain_e_2   ///
		handouttrain_e_3 handoutstuff_e_1 handoutstuff_e_2 handoutstuff_e_3 icconfhear_e_1 icconfhear_e_2 icconfhear_e_3 icconfhear_e_4 icconfhear_e_5   ///
		vote2011knowcandidates_e_1 vote2011knowcandidates_e_2 vote2011knowcandidates_e_3 vote2011knowcandidates_e_4 disabledspecify_b_1 stealweaponspecify_b_2 stealweaponspecify_b_1 stealweaponspecify_b_3  tempt1b_b_1 tempt1b_b_2 tempt1b_b_3 tempt1b_b_4 tempt1b_b_5 tempt2b_b_1 tempt2b_b_2 tempt2b_b_3 tempt3b_b_2 tempt3b_b_1 tempt3b_b_3 tempt3b_b_4 drugsellselfspecify_b_6  drugsellselfspecify_b_5  drugsellselfspecify_b_4  drugsellselfspecify_b_3  drugsellselfspecify_b_2  drugsellselfspecify_b_1 drugseverspecify_b_1 drugseverspecify_b_2 drugseverspecify_b_3 drugseverspecify_b_4  drugntgrssspecify_b_9 drugntgrssspecify_b_8 drugntgrssspecify_b_7 drugntgrssspecify_b_6 drugntgrssspecify_b_5 drugntgrssspecify_b_4 drugntgrssspecify_b_3 drugntgrssspecify_b_2 drugntgrssspecify_b_1 time_decl_umbrellas_b time_decl_medicine_b risk_decl_surgerychoice_b risk_decl_plentyprofit_b risk_decl_20surevs100lotto_b stealhustle_b time_decl_troublestarting_b time_decl_impulsebuy_b loanldwho_b hupeerwhat_b  alive10yr_b alive5yr_b alive1yr_b alive1mo_b alive1wk_b train1course_b train2course_b trade4wspecify_b causeconfusion_b hhcomposition_b carryweapondaynight_b carryweaponhowoften_b gamblefreq_b  savefreq_b savesusutype_b sleeptheft_b time_decl_celebrate_b risk_decl_gamble_b risk_decl_worrybizrisk_b time_decl_patient_b ///
		time_decl_saveproblems_b time_decl_hidemoney_b time_decl_regretspend_b famhelp_b famadvise_b famconcern_b famseeoften_b cheat_b  hardjokes_b time_decl_resisting_b ///
		time_decl_selfdiscipline_b time_decl_spendquick_b disobey_b se_notproud_b se_bizwell_b se_good4nothing_b se_goodperson_b se_respect_b se_fail_b se_useless_b   ///
		se_satisfied_b lc_success_b lc_peoplestreets_b lc_badluck_b lc_planswork_b lc_tryhard_b lc_bizluck_b lc_nocontrol_b lc_choicesfuture_b payrent_b brushallday_b carry_b ///
		walk_b troubleneighbors_b drinkboozedmuch_b time_hyp_100nowvs10x12_b  time_hyp_100nowvs10x9_b time_hyp_100nowvs10x10_b table4wowner_e shop4wowner_e buysell4wowner_e ///
		buysell4wowner_e pettytrade4wowner_e uviolnum_b killnum_b watersource_b bathe_b dwelling_b walls_b ownbed_b roof_b floor_b floor_e  mainactivity_e dadedu_b momedu_b ///
		mainactivity_b rel_b relchrist_b borncntry_b borncty_b tribe_b {
			ren `var' `var'_t
			gen `var'_t1 = lower(`var'_t)
			gen `var' = subinstr( `var'_t1 ,"- ","-",1)
			move `var' `var'_t
			drop `var'_t  `var'_t1
	}

	*"

// RECODE ALL THE SCHOOL LEVEL QUESTION SO THAT THERE IS ONLY ONE SCALE

	// Education

		foreach x in schoolbaslevel_b  schoolbasstop_b  schoollevel_e idv_schoollevel_e idv_schoolstop_e  {
			replace `x' ="97-Don't Know" if `x' =="DON'T KNOW" | `x' =="Don't know"
			replace `x' ="98-Refuse to Answer" if `x' =="REFUSE TO ANSWER"  | `x' =="REFUSES TO ANSWER"
			replace `x' ="0-None" if `x' =="NONE"   | `x' =="Never went to school"
			replace `x' ="1-ABC" if `x' =="ABC"
			replace `x' ="2-K1" if `x' =="K1"
			replace `x' ="3-K2" if `x' =="K2"
			replace `x' ="13-HS10" if `x' =="HS-10"
			replace `x' ="14-HS11" if `x' =="HS-11"
			replace `x' ="15-HS12" if `x' =="HS-12"
			replace `x' ="10-JH7" if `x' =="JH-7"
			replace `x' ="11-JH8" if `x' =="JH-8"  | `x' =="JH8"
			replace `x' ="12-JH9" if `x' =="JH-9"
			replace `x' ="4-P1" if `x' =="P1"
			replace `x' ="5-P2" if `x' =="P2"
			replace `x' ="6-P3" if `x' =="P3"
			replace `x' ="7-P4" if `x' =="P4"
			replace `x' ="8-P5" if `x' =="P5"
			replace `x' ="9-P6" if `x' =="P6"
			replace `x' ="16-High School Graduate" if `x' =="HS GRADUATE"
			replace `x' ="17-University" if `x' =="University"
		}

		replace momedu_b  = "0-none" if momedu_b  =="6- none"  | momedu_b  =="6-none"
		replace momedu_b  = "1-elementary(completed 6th)" if momedu_b  =="1-elementary" | momedu_b  =="1-elementary (up to 6th)" |    momedu_b  =="1-elementary (up to 6th)"
		replace momedu_b  = "2-junior high(completed 8th)" if momedu_b  =="2-junior high (up to 8th)" |   momedu_b  =="2-junior high (up to 8th)"
		replace momedu_b  = "3-high school(completed 12th)" if momedu_b  =="3-high school (up to 12th)" |  momedu_b  =="3-high school (up to 12th)"
		replace momedu_b  = "97-don't know" if momedu_b  =="7-don't know"
		replace momedu_b  = "98-refuse to answer" if momedu_b  =="8-refuse to answer"

		replace dadedu_b  = "0-none" if dadedu_b  =="6- none" |  dadedu_b  =="6-none"
		replace dadedu_b  = "1-elementary(completed 6th)" if dadedu_b  =="1-elementary" | dadedu_b  =="1-elementary (up to 6th)" |    dadedu_b  =="1-elementary (up to 6th)"
		replace dadedu_b  = "2-junior high(completed 8th)" if dadedu_b  =="2-junior high (up to 8th)" |   dadedu_b  =="2-junior high (up to 8th)"
		replace dadedu_b  = "3-high school(completed 12th)" if dadedu_b  =="3-high school (up to 12th)" |  dadedu_b  =="3-high school (up to 12th)"
		replace dadedu_b  = "4-university" if dadedu_b  =="4-university"
		replace dadedu_b  = "5-post-graduate school" if dadedu_b  =="5-post-graduate school"
		replace dadedu_b  = "97-don't know" if dadedu_b  =="7-don't know"
		replace dadedu_b  = "98-refuse to answer" if dadedu_b  =="8-refuse to answer"


	// Conclusion

		foreach var  of varlist ccldistract_e_* {
			replace `var' = "1-Rain" if `var' =="2-Rain"
			replace `var' = "96-Other" if `var' =="12-Other"
			replace `var' = "4-Friend present" if `var' =="5-Friend present"
			replace `var' = "6-Others present" if `var' =="7-Others present"
			replace `var' = "7-Had to work" if `var' =="8-Had to work"
		}

		replace cclvisiblyangry_e ="0-No" if cclvisiblyangry_e=="1-No"
		replace cclvisiblyangry_e ="1-Yes, one time" if cclvisiblyangry_e=="2-Yes, one time"
		replace cclvisiblyangry_e ="2-Yes, more than one time" if cclvisiblyangry_e=="3-Yes, more than one time"


	// Drugs specify

		foreach var  of varlist drugsellselfspecify_e_* drugsellselfspecify_b_* drugntgrssspecify_b_* drugseverspecify_b_* drugntgrssspecify_e_* drugtabletspecify_e_*   {
			replace `var' = "1-diazepan" if `var' =="8-dizapane"
			replace `var' = "2-bubble/10-10/valium" if `var' =="2-bubble or 10-10 or valium" | `var' =="6-valium/bubble" |  `var' =="6-valium/bubble"
			replace `var' = "6-brown brown" if `var' =="5-brown brown" | `var' =="6 -brown brown" | `var' =="4-brown-brown"
			replace `var' = "7-dugee" if `var' =="2-dugee" | `var' =="3-dugee"
			replace `var' = "8-cocaine" if `var' =="4-coco" | `var' =="5-cocaine"
			replace `var' = "9-Heroin" if `var' =="4-heroin" | `var' =="6-heroin"
			replace `var' = "10-Marijuana/Grass/Opium" if `var' =="1-marijuana" | `var' =="1-marijuana or grass or opium" | `var' =="1-marijuana/grass/opium"
			replace `var' = "11-italian/Tie White/Rolling Tar" if `var' =="3-italian/tie white" | `var' =="3-dugee/italianwhite/rollingta" | `var' =="3-italian/tie white, roll. tar" | `var' =="3-italian white/tie white/cocaine"
			replace `var' = "11-italian/Tie White/Rolling Tar" if `var' =="3-italian/tie white" | `var' =="3-italian/tie white/cocainelk" | `var' =="3-tie white or rolling t"| `var' =="3-tie white or rolling t "
			replace `var' = "12-Diazepan/Bubble/10-10/Valium/Dugee" if `var' =="2-diazepan/bubble/10-10/valium"| `var' =="2-diazepan or bubble or 10-10" | `var' =="3-italian/tie white/cocainelk" | `var' =="2-diazepan or bubble or 10-10"| `var' =="2-diazepan/bubble/10-10/valium"
			replace `var' = "96-other" if `var' =="9-other"
		}

	// Main Activity

		replace mainactivity_b  = "" if mainactivity_b  =="-99-missing"
		replace mainactivity_b  = "03-buying and selling around" if mainactivity_b  =="4-buying and selling"
		replace mainactivity_b  = "04-other small small business" if mainactivity_b  =="5-any other petty trade or small business"
		replace mainactivity_b  = "05-skilled trade/vocation" if mainactivity_b  =="2-skilled trade or vocation"
		replace mainactivity_b  = "06-office work" if mainactivity_b  =="3-office work"
		replace mainactivity_b  = "07-carloading" if mainactivity_b  =="6-carloading"
		replace mainactivity_b  = "08-carwashing" if mainactivity_b  =="7-carwashing"
		replace mainactivity_b  = "09-peim peim driver" if mainactivity_b  =="8-peim-peim driving"
		replace mainactivity_b  = "12-house boy/brushing/cleaning" if mainactivity_b  =="12-cleaning or sweeping" | mainactivity_b  == "13-prepare food or drink"
		replace mainactivity_b  = "13-look for scraps" if mainactivity_b  =="14-look for scraps or bottles"
		replace mainactivity_b  = "10-carry load for money" if mainactivity_b  =="9-carry loads for money"
		replace mainactivity_b  = "19-no activity" if mainactivity_b  =="0"
		replace mainactivity_b  = "16-sell opium or drugs" if mainactivity_b  =="17-sell opium or drugs" | mainactivity_b  =="16-sell opium or drugs "
		replace mainactivity_b  = "17-other kind of activity" if mainactivity_b  =="19-other kind of hustle"
		replace mainactivity_b  = "18-anything else" if mainactivity_b  =="20-other activity we did not mention"

		replace mainactivity_e  = "09-peim peim driver" if mainactivity_e  =="09-paim paim driver"
		replace mainactivity_e  = "12-house boy/brushing/cleaning/sweeping" if mainactivity_e  =="12-house boy/brushing/cleaning"

	// Training course
		* Check trade4wspecify


		replace trainbizcourse_b  = "96-Other" if trainbizcourse_b  =="4-other"

		replace train2course_b  = "2-masonry" if train2course_b  =="5-masonry"
		replace train2course_b  = "5-driving" if train2course_b  =="8-driving"
		replace train2course_b  = "96-other" if train2course_b  =="16-other"

		replace train1course_b  = "96-other" if train1course_b  =="16-other"
		replace train1course_b  = "1-carpentry" if train1course_b  =="2-carpentry"
		replace train1course_b  = "2-masonry" if train1course_b  =="5-masonry"
		replace train1course_b  = "9-soap making" if train1course_b  =="4-soap making"
		replace train1course_b  = "5-driving" if train1course_b  =="8-driving"
		replace train1course_b  = "10-cooking/baking" if train1course_b  =="9-cooking/baking"

	// Party and Political questions

		replace voteprezpref_e = "1-Ellen Johnson-Sirleaf" if voteprezpref_e =="1-Ellen Johnson Sirleaf"
		replace voteprezpref_e = "5-Dew Mayson" if voteprezpref_e =="5-Dew Mason"

		replace voteparty_e = "96-Other" if voteparty_e=="9-Other"
		replace voteparty_e = "4-Liberty Party" if voteparty_e == "4-LP"
		replace voteparty_e = "0-None" if voteparty_e == "0- None"
		replace voteparty_e = "2-Unity Party" if voteparty_e == "2-UP"
		replace voteparty_e = "98-Refuse to answer" if voteparty_e == "98- Refuse to answer"

		replace vo2011octvoteparty_e= "2-Unity Party " if vo2011octvoteparty_e=="1-Unity Party "
		replace vo2011octvoteparty_e= "2-Unity Party" if vo2011octvoteparty_e=="1-Unity Party"
		replace vo2011octvoteparty_e= "1-CDC" if vo2011octvoteparty_e=="2-CDC"
		replace vo2011octvoteparty_e= "8-NUDP" if vo2011octvoteparty_e=="3-NUDP"
		replace vo2011octvoteparty_e= "9-LTP" if vo2011octvoteparty_e=="5-LTP"

		replace vo2011novvoteparty_e="2-Unity Party" if vo2011novvoteparty_e=="1-Unity Party"
		replace vo2011novvoteparty_e="1-CDC" if vo2011novvoteparty_e=="2-CDC"

		replace voattendrallyparty_e="2-Unity Party" if voattendrallyparty_e=="1-Unity Party"
		replace voattendrallyparty_e="4-Liberty party" if voattendrallyparty_e=="3-Charles Brumskine, Liberty Party"
		replace voattendrallyparty_e="6-ANC" if voattendrallyparty_e=="5-Alexander B. Cummings, Alternative National Congress" // triple check this
		replace voattendrallyparty_e="1-CDC" if voattendrallyparty_e=="2-CDC"
		replace voattendrallyparty_e="8-NUDP " if voattendrallyparty_e=="3-NUDP"

		replace vopaidrallyparty_e="2-Unity Party" if vopaidrallyparty_e=="1-Unity Party"
		replace vopaidrallyparty_e="2-Unity Party" if vopaidrallyparty_e=="2-Joseph Boakai, Unity Party"
		replace vopaidrallyparty_e="1-CDC" if vopaidrallyparty_e=="2-CDC"
		replace vopaidrallyparty_e="8-NUDP " if vopaidrallyparty_e=="3-NUDP"

		replace pvpeerjoinlootpaidparty_e="2-Unity Party" if pvpeerjoinlootpaidparty_e=="1-Unity Party"
		replace pvpeerjoinlootpaidparty_e="1-CDC" if pvpeerjoinlootpaidparty_e=="2-CDC"
		replace pvpeerjoinlootpaidparty_e="8-NUDP " if pvpeerjoinlootpaidparty_e=="3-NUDP"

		replace pvjoinlootpaidparty_e="2-Unity Party" if pvjoinlootpaidparty_e=="1-Unity Party"
		replace pvjoinlootpaidparty_e="1-CDC" if pvjoinlootpaidparty_e=="2-CDC"
		replace pvjoinlootpaidparty_e="8-NUDP " if pvjoinlootpaidparty_e=="3-NUDP"

		replace disabledspecify_b_1   = "0-None" if disabledspecify_b_1=="9- NONE"
		replace disabledspecify_b_2   = "0-None" if disabledspecify_b_2=="9- NONE"
		replace disabledspecify_b_1   = "96-Other disability" if disabledspecify_b_1=="8- OTHER DISABILITY"
		replace disabledspecify_b_2   = "96-Other disability" if disabledspecify_b_2=="8- OTHER DISABILITY"

		replace votepaidrallyparty_e_1   = "2-unity party" if votepaidrallyparty_e_1=="2-up"

	// Dwelling questions

		replace floor_b  = "1-concrete/stone" if floor_b  =="1-concrete/stone"
		replace floor_b  = "2-red earth" if floor_b  =="2-red earth"
		replace floor_b  = "3-wood" if floor_b  =="3- wood planks" |  floor_b=="3-wood planks"
		replace floor_b  = "5-bare ground" if floor_b  =="5-bare ground"
		replace floor_b  = "6-tarpaulin/plastic" if floor_b  =="6-tarpaulin/plastic"

		replace sleepdry_b  = "1-Yes" if sleepdry_b  =="1- YES"  | sleepdry_b  =="1-yes"
		replace sleepdry_b  = "2-No, small water/leaks" if sleepdry_b  =="2- NO- SMALL WATER/LEAKS" | sleepdry_b  =="2- NO"   | sleepdry_b  =="2-no" | sleepdry_b  =="2-no- small water/leaks"
		replace sleepdry_b  = "3-No, big water" if sleepdry_b  =="3- NO BIG WATER" | sleepdry_b  =="3- NO- BIG WATER" | sleepdry_b  == "3-no big water" | sleepdry_b  =="3-no- big water"

		replace roof_b  = "2-tarpaulin/plastic" if roof_b  =="2- tarpaulin/plastic"


		replace walls_b  = "4-dirt block" if walls_b  =="4-dirt blocks"
		replace walls_b  = "8-plywood/reused wood" if walls_b  =="8-plywood/reused sood"

		replace dwelling_e  = "1-House/Hut/Room in a house" if dwelling_e  =="1-House/Hut/Shack/ Room in a house"
		replace dwelling_e  = "7-Market House/business place" if dwelling_e  =="7-Market House"
		replace dwelling_e  = "5-In a vehicle/container" if dwelling_e  =="5-In a Vehicle"

		replace dwelling_b  = "1-house/hut/room in a house" if dwelling_b  =="1-house/room in a house"
		replace dwelling_b  = "5-in a vehicle/container" if dwelling_b  =="5-in a vehicle"
		replace dwelling_b  = "7-market house/business place" if dwelling_b  =="7-market house"

		replace bathe_b  = "1-community bathroom" if bathe_b  =="1-community bahtroom"
		replace bathe_b  = "3-river / beach / outside" if bathe_b  =="3-river/beach/outside"

		replace watersource_b  = "5-mineral water" if watersource_b  =="5-buy in bottles"


	// Mispelling
		replace troubleneighbors_b = "4-not at all" if troubleneighbors_b =="4-not al all"
		replace causeconfusion_b  = "4-never" if causeconfusion_b  == "4-nevre"


	// Miscellaneous

		foreach x in g9a_e g9g_b g9h_b g9i_b g9j_b g9f_b g9e_b g9e_e g9f_e g9g_e g9h_e g9i_e g9j_e g10c_b g10d_b  g10f_b g10e_b {
			replace `x' = "1-Option 1" if `x'  =="1"
			replace `x' = "2-Option 2" if `x'  =="2"
		}

		foreach x in g9a_e g9g_b g9h_b g9i_b g9j_b g9f_b g9e_b g10c_b g10d_b  g10f_b g10e_b causeconfusion_b carryweaponhowoften_b carryweapondaynight_b hhpalavas_b hhhelpjammed_b hhconcerned_b hhadvise_b  hhshare_b hhsharefood_b ///
			famquarrel_b beg2wowner_e drugsell2wowner_e trainbizcourse_e hearconsent2_e {
			replace `x' = "" if `x'  =="."
		}

		foreach x in time_decl_spendquick_b time_decl_selfdiscipline_b time_decl_resisting_b time_decl_regretspend_b time_decl_hidemoney_b ///
			time_decl_saveproblems_b time_decl_patient_b risk_decl_worrybizrisk_b risk_decl_gamble_b time_decl_celebrate_b {
			replace `x' =  "4-no" if `x'  =="4-never"
		}

		foreach x in g10cv2_e g10dv2_e g10ev2_e g10fv2_e g9jv2_e g9iv2_e  g9hv2_e  g9gv2_e g9a_e g9g_e g9i_e g9j_e{
			replace `x' = "99-Not Applicable" if `x' =="3-Not applicable" | `x' =="99-Not applicable"
			replace `x' = "99-Not Applicable" if `x' =="99-Missing"
		}

		replace savefreq_b  ="0-never" if   savefreq_b  =="0"
		replace badshare_b = "" if badshare_b =="-99" | badshare_b =="." | badshare_b =="-99- MISSING"

		replace cheat_b = "" if  cheat_b =="-99" |  cheat_b =="." |  cheat_b =="-99- MISSING" | cheat_b =="-99-missing"
		replace cheat_b = "1-everytime" if  cheat_b =="1-always"

		replace famhelp_b = "" if  famhelp_b =="-99" |  famhelp_b =="." |  famhelp_b =="-99- MISSING" | famhelp_b =="-99-missing"
		replace famhelp_b = "1-everytime" if  famhelp_b =="1-always"

		replace famadvise_b = "" if  famadvise_b =="-99" |  famadvise_b =="." | famadvise_b =="-99-missing"
		replace famadvise_b = "1-everytime" if  famadvise_b =="1-always"

		replace hardjokes_b = "" if  hardjokes_b =="-99" |  hardjokes_b =="." |  hardjokes_b =="-99- MISSING" | hardjokes_b =="-99-missing"
		replace hardjokes_b = "1-everytime" if  hardjokes_b =="1-always"

		replace famseeoften_b = "" if  famseeoften_b =="-99" |  famseeoften_b =="." |  famseeoften_b =="-99- MISSING" | famseeoften_b =="-99-missing"
		replace famseeoften_b = "1-everytime" if  famseeoften_b =="1-always"

		replace badvex_b = "" if  badvex_b =="-99"
		replace badtired_b = "" if  badtired_b =="-99"

		replace takethings_e="4-Never" if takethings_e=="#4-Never"

		replace stealweaponspecify_b_3 = "96-other" if stealweaponspecify_b_3 =="8-other"
		replace se_notproud_b = "1-really agree" if se_notproud_b =="1-strongly agree"

		replace trade2wspecify_e ="5-Driving" if  trade2wspecify_e =="6-Driving"
		replace trade2wspecify_e ="7-Tailoring" if  trade2wspecify_e =="5-Tailoring"
		replace trade2wspecify_e ="6-Computers" if  trade2wspecify_e =="7-Computers"

		replace sleeptheft_b  ="4-yes, yearly" if   sleeptheft_b  =="5-yearly"

		replace hhcomposition_b = "1-mostly family" if hhcomposition_b =="1-family"
		replace hhcomposition_b = "2-mostly friends" if hhcomposition_b =="2-friends"

		replace hupeerwhat_b = "1-steal or rob" if hupeerwhat_b =="1-steal or rob "
		replace hupeerwhat_b = "96-other" if hupeerwhat_b =="5-other"
		replace hupeerwhat_b = "97" if hupeerwhat_b =="97-don't know"
		replace hupeerwhat_b = "98" if hupeerwhat_b =="98-refuse to answer"

		replace loanldwho_b = "2-friend" if loanldwho_b =="2-friends"

		replace relchrist_b  = "97-don't know" if relchrist_b  =="8- don't know"
		replace relchrist_b  = "96-other" if relchrist_b  =="9- other"

		replace risk_decl_20surevs100lotto_b  = "1-20 usd for sure" if risk_decl_20surevs100lotto_b  =="1-20 now " | risk_decl_20surevs100lotto_b  =="1-20 now"

		replace stealhustle_b ="1-steal or rob" if stealhustle_b =="1-steal or rob "
		replace time_hyp_100nowvs10x12_b ="1-100 usd now" if time_hyp_100nowvs10x12_b =="1-100 usd now "
		replace gamblefreq_b ="4-rarely" if gamblefreq_b =="4-rarely "

		replace dg_candychoice_e= "4-Peppermint" if dg_candychoice_e=="3-Peppermint"

		replace sleeptheft_e="1-Yes" if sleeptheft_e=="1-Yes, daily" | sleeptheft_e=="2-Yes, weekly" | sleeptheft_e=="3-Yes, monthly" | sleeptheft_e=="4-Yes, yearly"
		replace sleeptheft_e="0-No" if sleeptheft_e=="5-No"
  		replace vo2011octvoteparty_e="7-NDC" if vo2011octvoteparty_e=="8-NDC"

/*2020 replacements*/

		replace lvg1notmoncty_e = "1-Bomi"              if lvg1notmoncty_e=="bomi"
	    replace lvg1notmoncty_e = "2-Bong"              if lvg1notmoncty_e=="bong"
	    replace lvg1notmoncty_e = "3-Gbarpolu"          if lvg1notmoncty_e=="gb"  | lvg1notmoncty_e=="gbar"
		replace lvg1notmoncty_e = "5-Grand Cape Mount"  if lvg1notmoncty_e=="gcm" | lvg1notmoncty_e=="gk"
		replace lvg1notmoncty_e = "9-Margibi"           if lvg1notmoncty_e=="marg"
		replace lvg1notmoncty_e = "10-Maryland"         if lvg1notmoncty_e=="mary"
		replace lvg1notmoncty_e = "11-Montserrado"      if lvg1notmoncty_e=="mont"
		replace lvg1notmoncty_e = "12-Nimba"            if lvg1notmoncty_e=="nimba"
	    replace lvg1notmoncty_e = "13-River Cess"       if lvg1notmoncty_e=="rc"
        replace lvg1notmoncty_e = "14-Sinoe"            if lvg1notmoncty_e=="sinoe"
		replace lvg1notmoncty_e = "8-Lofa"              if lvg1notmoncty_e=="lofa"
		replace lvg1notmoncty_e = "7-Grand Gedeh"       if lvg1notmoncty_e=="gg"
		replace lvg1notmoncty_e = "15-River Gee"        if lvg1notmoncty_e=="rg"


	    replace lvg2notmoncty_e = "1-Bomi"              if lvg2notmoncty_e=="bomi"
      	replace lvg2notmoncty_e = "2-Bong"              if lvg2notmoncty_e=="bong"
        replace lvg2notmoncty_e = "3-Gbarpolu"          if lvg2notmoncty_e=="gb"  | lvg1notmoncty_e=="gbar"
		replace lvg2notmoncty_e = "5-Grand Cape Mount"  if lvg2notmoncty_e=="gcm" | lvg1notmoncty_e=="gk"
        replace lvg2notmoncty_e = "8-Lofa"              if lvg2notmoncty_e=="lofa"
        replace lvg2notmoncty_e = "9-Margibi"           if lvg2notmoncty_e=="marg"
		replace lvg2notmoncty_e = "11-Montserrado"      if lvg2notmoncty_e=="mont"
		replace lvg2notmoncty_e = "12-Nimba"            if lvg2notmoncty_e=="nimba"
	    replace lvg2notmoncty_e = "13-River Cess"       if lvg2notmoncty_e=="rc"
        replace lvg2notmoncty_e = "14-Sinoe"            if lvg2notmoncty_e=="sinoe"
		replace lvg2notmoncty_e = "8-Lofa"              if lvg2notmoncty_e=="lofa"
		replace lvg2notmoncty_e = "7-Grand Gedeh"       if lvg2notmoncty_e=="gg"
	    replace lvg2notmoncty_e = "15-River Gee"        if lvg2notmoncty_e=="rg"

        replace hupeerwhat_e    = "1-Steal or Rob" if hupeerwhat_e =="1-Steal or rob"
        replace hupeerwhat_e    = "2-Sell Drugs"   if hupeerwhat_e =="2-Sell drugs"
        replace hupeerwhat_e    = "96-Other"       if hupeerwhat_e =="5-Other"

        replace risk_decl_keepjob250vs50_e = "1-250 USD" if risk_decl_keepjob250vs50_e == "1-250 dollar (can end any time)"
	    replace risk_decl_keepjob250vs50_e = "2-50 USD"  if risk_decl_keepjob250vs50_e == "2-50 dollar (can keep for long time)"
        replace risk_decl_keepjob200vs75_e = "1-200 USD" if risk_decl_keepjob200vs75_e == "1-200 dollar (can end any time)"
	    replace risk_decl_keepjob200vs75_e = "2-75 USD"  if risk_decl_keepjob200vs75_e == "2-75 dollar (can keep for long time)"

	    replace hhcomposition_e = "1-Mostly Family"  if hhcomposition_e == "1-Mostly family"
	    replace hhcomposition_e = "2-Mostly Friends" if hhcomposition_e == "2-Mostly friends"

        replace roof_e = "1-Zinc/Metal" if  roof_e =="1- Zinc/Metal"
        replace roof_e = "7-Concrete/Cement" if  roof_e == "7-Concrete/cement"
        replace bathe_e= "3-River / Beach / Outside" if bathe_e == "3-River/beach/outside"
        replace toilet_e= "7-River / Creek / Beach" if toilet_e == "7-River/creek/beach"
        replace toilet_e= "6-Uncovered laterine" if toilet_e == "6-Uncovered latrine"

        replace  g9fv2_e= "1-Option 1" if  g9fv2_e=="1-Option 1: 80 LD in two weeks by a returning member of our team"
        replace  g9fv2_e= "2-Option 2" if  g9fv2_e=="2-Option 2: 240 LD in four weeks by a returning member of our team"
        replace  g9fv3_e= "1-Option 1" if  g9fv3_e=="1-Option 1: 100 LD in two weeks by a returning member of our team"
        replace  g9fv3_e= "2-Option 2" if  g9fv3_e=="2-Option 2: 300 LD in 4 weeks by a returning member of our team"
        replace  g9ev2_e= "1-Option 1" if  g9ev2_e=="1-Option 1: 80 LD now"
        replace  g9ev2_e= "2-Option 2" if  g9ev2_e=="2-Option 2: 240 LD in two weeks by a returning member of our team"
        replace  g9ev3_e= "1-Option 1" if  g9ev3_e=="1-Option 1: 100 LD now"
        replace  g9ev3_e= "2-Option 2" if  g9ev3_e=="2-Option 2: 300 LD in two weeks by a returning member of our team"
        replace  g9jv2_e= "1-Option 1" if  g9jv2_e=="1-Option 1: 80 LD in two weeks by a returning member of our team"
        replace  g9jv2_e= "2-Option 2" if  g9jv2_e=="2-Option 2: 150 LD in 4 weeks by a returning member of our team"
        replace  g9jv3_e= "1-Option 1" if  g9jv3_e=="1-Option 1: 100 LD in two weeks by a returning member of our team"
        replace  g9jv3_e= "2-Option 2" if  g9jv3_e=="2-Option 2: 240 LD in 4 weeks by a returning member of our team"
        replace  g9iv2_e= "1-Option 1" if  g9iv2_e=="1-Option 1: 80 LD in two weeks by a returning member of our team"
        replace  g9iv2_e= "2-Option 2" if  g9iv2_e=="2-Option 2: 500 LD in 4 weeks by a returning member of our team"
        replace  g9iv3_e= "1-Option 1" if  g9iv3_e=="1-Option 1: 100 LD in two weeks by a returning member of our team"
        replace  g9iv3_e= "2-Option 2" if  g9iv3_e=="2-Option 2: 600 LD in 4 weeks by a returning member of our team"
        replace  g9hv2_e= "1-Option 1" if  g9hv2_e=="1-Option 1: 80 LD now"
        replace  g9hv2_e= "2-Option 2" if  g9hv2_e=="2-Option 2: 150 LD in two weeks by a returning member of our team"
        replace  g9hv3_e= "1-Option 1" if  g9hv3_e=="1-Option 1: 100 LD now"
        replace  g9hv3_e= "2-Option 2" if  g9hv3_e=="2-Option 2: 240 LD in two weeks by a returning member of our team"
        replace  g9gv2_e= "1-Option 1" if  g9gv2_e=="1-Option 1: 80 LD now"
        replace  g9gv2_e= "2-Option 2" if  g9gv2_e=="2-Option 2: 500 LD in 2 weeks by a returning member of our team"
        replace  g9gv3_e= "1-Option 1" if  g9gv3_e=="1-Option 1: 100 LD now"
        replace  g9gv3_e= "2-Option 2" if  g9gv3_e=="2-Option 2: 600 LD in 2 weeks by a returning member of our team"

        replace  g10cv2_e= "1-Option 1" if  g10cv2_e=="1-Option 1: If you win, you get 200 LD. If you lose, you get 110 LD."
        replace  g10cv2_e= "2-Option 2" if  g10cv2_e=="2-Option 2: If you win, you get 300 LD. If you lose, you get 50 LD."
        replace  g10dv2_e= "1-Option 1" if  g10dv2_e=="1-Option 1: If you win, you get 200 LD. If you lose, you get 110 LD."
        replace  g10dv2_e= "2-Option 2" if  g10dv2_e=="2-Option 2: If you win, you get 500 LD. If you lose, you get 80 LD."
        replace  g10ev2_e= "1-Option 1" if  g10ev2_e=="1-Option 1: If you win, you get 200 LD. If you lose, you get 110 LD."
        replace  g10ev2_e= "2-Option 2" if  g10ev2_e=="2-Option 2: If you win, you get 250 LD. If you lose, you get 50 LD."
        replace  g10fv2_e= "1-Option 1" if  g10fv2_e=="1-Option 1: Do Nothing."
        replace  g10fv2_e= "2-Option 2" if  g10fv2_e=="2-Option 2: A lucky ticket in which if you win, you get 100 LD, but if you lose, y"


        replace  g9a_e = "1-Option 1" if g9a_e =="1-Option 1: 100 LD now"
        replace  g9a_e = "2-Option 2" if g9a_e =="2-Option 2: 200 LD in two weeks by a returning member of our team"
        replace  g10c_e= "1-Option 1" if g10c_e=="1-Option 1: We play lucky ticket. If you win, you get 150 LD. If you lose, you get"
        replace  g10c_e= "2-Option 2" if g10c_e=="2-Option 2: We play lucky ticket. If you win, you get 240 LD. If you lose, you get"
        replace  g10d_e= "1-Option 1" if g10d_e=="1-Option 1: We play lucky ticket. If you win, you get 150 LD. If you lose, you get"
        replace  g10d_e= "2-Option 2" if g10d_e=="2-Option 2: We play lucky ticket. If you win, you get 300 LD. If you lose, you get"
        replace  g10e_e= "1-Option 1" if g10e_e=="1-Option 1: We play lucky ticket. If you win, you get 150 LD. If you lose, you get"
        replace  g10e_e= "2-Option 2" if g10e_e=="2-Option 2: We play lucky ticket. If you win, you get 240 LD. If you lose, you get"
        replace  g10f_e= "1-Option 1" if g10f_e=="1-Option 1: Do nothing"
        replace  g10f_e= "2-Option 2" if g10f_e=="2-Option 2: A lucky ticket in which if you win, you get 150 LD, but if you lose, y"

        replace cnsc_prepare_e="1-Really Agree"    if cnsc_prepare_e=="1-Really agree"
        replace cnsc_prepare_e="4-Really Disagree"    if cnsc_prepare_e=="4-Really disagree"
        replace cnsc_details_e="1-Really Agree"    if cnsc_details_e=="1-Really agree"
        replace cnsc_details_e="4-Really Disagree"    if cnsc_details_e=="4-Really disagree"
        replace cnsc_doitright_e="1-Really Agree"  if cnsc_doitright_e=="1-Really agree"
        replace cnsc_doitright_e="4-Really Disagree"  if cnsc_doitright_e=="4-Really disagree"
        replace cnsc_plans_e="1-Really Agree"      if cnsc_plans_e=="1-Really agree"
        replace cnsc_plans_e="4-Really Disagree"      if cnsc_plans_e=="4-Really disagree"
        replace cnsc_work_e="1-Really Agree"       if cnsc_work_e=="1-Really agree"
        replace cnsc_work_e="4-Really Disagree"       if cnsc_work_e=="4-Really disagree"
        replace cnsc_getby_e="1-Really Agree"      if cnsc_getby_e=="1-Really agree"
        replace cnsc_getby_e="4-Really Disagree"      if cnsc_getby_e=="4-Really disagree"
        replace cnsc_complete_e="1-Really Agree"      if cnsc_complete_e=="1-Really agree"
        replace cnsc_complete_e="4-Really Disagree"      if cnsc_complete_e=="4-Really disagree"
        replace cnsc_shirk_e="1-Really Agree"      if cnsc_shirk_e=="1-Really agree"
        replace cnsc_shirk_e="4-Really Disagree"      if cnsc_shirk_e=="4-Really disagree"

        replace prsv_overcome_e="1-Really Agree"    if prsv_overcome_e=="1-Really agree"
        replace prsv_overcome_e="4-Really Disagree"    if prsv_overcome_e=="4-Really disagree"
        replace prsv_ambitious_e="1-Really Agree"    if prsv_ambitious_e=="1-Really agree"
        replace prsv_ambitious_e="4-Really Disagree"    if prsv_ambitious_e=="4-Really disagree"
        replace prsv_discourage_e="1-Really Agree"    if prsv_discourage_e=="1-Really agree"
        replace prsv_discourage_e="4-Really Disagree"    if prsv_discourage_e=="4-Really disagree"
        replace prsv_changeplan_e="1-Really Agree"    if prsv_changeplan_e=="1-Really agree"
        replace prsv_changeplan_e="4-Really Disagree"    if prsv_changeplan_e=="4-Really disagree"
        replace prsv_achieveimp_e="1-Really Agree"    if prsv_achieveimp_e=="1-Really agree"
        replace prsv_achieveimp_e="4-Really Disagree"    if prsv_achieveimp_e=="4-Really disagree"
        replace prsv_achievenoimp_e="1-Really Agree"    if prsv_achievenoimp_e=="1-Really agree"
        replace prsv_achievenoimp_e="4-Really Disagree"    if prsv_achievenoimp_e=="4-Really disagree"
        replace prsv_driven_e="1-Really Agree"    if prsv_driven_e=="1-Really agree"
        replace prsv_driven_e="4-Really Disagree"    if prsv_driven_e=="4-Really disagree"

        replace bas_goallout_e="1-Really Agree"    if bas_goallout_e=="1-Really agree"
        replace bas_goallout_e="4-Really Disagree"    if bas_goallout_e=="4-Really disagree"
        replace bas_noholds_e="1-Really Agree"    if bas_noholds_e=="1-Really agree"
        replace bas_noholds_e="4-Really Disagree"    if bas_noholds_e=="4-Really disagree"
        replace bas_doforfun_e="1-Really Agree"    if bas_doforfun_e=="1-Really agree"
        replace bas_doforfun_e="4-Really Disagree"    if bas_doforfun_e=="4-Really disagree"
        replace bas_keepatit_e="1-Really Agree"    if bas_keepatit_e=="1-Really agree"
        replace bas_keepatit_e="4-Really Disagree"    if bas_keepatit_e=="4-Really disagree"
        replace bas_feelexcite_e="1-Really Agree"    if bas_feelexcite_e=="1-Really agree"
        replace bas_feelexcite_e="4-Really Disagree"    if bas_feelexcite_e=="4-Really disagree"
        replace bas_seeopp_e="1-Really Agree"    if bas_seeopp_e=="1-Really agree"
        replace bas_seeopp_e="4-Really Disagree"    if bas_seeopp_e=="4-Really disagree"
        replace bas_feelstrongly_e="1-Really Agree"    if bas_feelstrongly_e=="1-Really agree"
        replace bas_feelstrongly_e="4-Really Disagree"    if bas_feelstrongly_e=="4-Really disagree"
        replace bas_wincontest_e="1-Really Agree"    if bas_wincontest_e=="1-Really agree"
        replace bas_wincontest_e="4-Really Disagree"    if bas_wincontest_e=="4-Really disagree"

        replace voattendrallyparty_e="2-Unity Party"    if voattendrallyparty_e=="2-Joseph Boakai, Unity Party"
        replace voattendrallyparty_e="1-CDC"    if voattendrallyparty_e=="1-George Weah, Coalition for Democratic Change"
        replace vopaidrallyparty_e="1-CDC"    if vopaidrallyparty_e=="1-George Weah, Coalition for Democratic Change"
        replace pvjoinlootpaidparty_e="2-Unity Party"    if pvjoinlootpaidparty_e=="2-Joseph Boakai, Unity Party"
        replace pvjoinlootpaidparty_e="1-CDC"    if pvjoinlootpaidparty_e=="1-George Weah, Coalition for Democratic Change"

        replace fexcoms_e ="2-Less than Half" if fexcoms_e=="2-Less than half"
        replace fexcoms_e ="4-More than Half" if fexcoms_e=="4-More than half"



foreach  v of varlist nrtc_relax_e nrtc_sad_e nrtc_bother_e nrtc_worry_e nrtc_threaten_e nrtc_offend_e nrtc_stress_e nrtc_disturb_e ///
                      lc_choicesfuture_e lc_nocontrol_e lc_bizluck_e lc_bizluck_e lc_tryhard_e lc_planswork_e lc_badluck_e lc_peoplestreets_e lc_success_e ///
                      se_satisfied_e se_useless_e se_fail_e se_respect_e se_goodperson_e se_good4nothing_e se_bizwell_e se_notproud_e {
         replace `v' ="1-Really Agree"    if `v'=="1-Really agree"
         replace `v' ="4-Really Disagree" if `v'=="4-Really disagree"
 }


foreach  v of varlist time_hyp_mnygm1v2_e time_hyp_mnygm2v2_e time_hyp_mnygm3v2_e time_hyp_mnygm4v2_e time_hyp_mnygm5v2_e time_hyp_mnygm6v2_e {
         replace `v'="1-Option 1" if regexm(`v',"1-")==1
         replace `v'="2-Option 2" if regexm(`v',"2-")==1
 }

        foreach  v of varlist time_hyp_mnygm1_e time_hyp_mnygm2_e time_hyp_mnygm3_e time_hyp_mnygm4_e time_hyp_mnygm5_e time_hyp_mnygm6_e {
         replace `v'="1-Option one" if regexm(`v',"1-")==1
         replace `v'="2-Option two" if regexm(`v',"2-")==1
        }

        foreach v of varlist maccuse_e mthreat_e  minsult_e mhit_e{
        	replace `v' = "99-Not applicable" if `v'=="-666-Not applicable (did not have a woman in the past month)"
        	replace `v'="1-Everytime" if `v'=="1-Every time"
        }


// DESTRING VARIABLES WITHOUT DASH

	la def voinfohow 1 "Newspaper" 2 "Party meetings" 3 "Radio" 4 "Talking to people" 96 "Other" 6 "TV" 7 "Saw myself"
		foreach x of varlist voinfohow_e_* voinfo7nov2011how_e_* {
			replace `x' = "1" if `x'  =="Newspaper"
			replace `x' = "2" if `x' =="Party meetings"
			replace `x' = "3" if `x'  =="Radio"
			replace `x' = "4" if `x'  =="Talking to people"
			replace `x' = "96" if `x'  =="Other"
			replace `x' = "6" if `x' =="TV"
			replace `x' = "7" if `x'  =="Saw myself"
			destring `x', replace
			la val `x' voinfohow
		}


	la  def dwmy 1 "Day" 2 "Week" 3 "Month" 4 "Year"
		foreach var in talkcommunit_e sleepstreet12mamtunit_b  drugseverhowlongunit_b  drugseverlastunit_b steallastunit_b fighterlengthunit_b displacedxunit_b refugeexunit_b ownbizlastunit_b  ownbizexpunit_b farmlastunit_b drugselleveramtunit_b drugselllastunit_b startbizexpunit_b startbizlastunit_b  officelastunit_b tradelastunit_b shoplastunit_b relchristimeunit_b  monroviatimeunit_b  relmeetunit_b  train1timeunit_b train2timeunit_b trainbiztimeunit_b shopeveramtunit_b  tableeveramtunit_b ///
			buyselleveramtunit_b	pettytradeeveramtunit_b tradeeveramtunit_b officeeveramtunit_b motoeveramtunit_b  farmeveramtunit_b ///
			factionlengthunit_b   sleepstreet4wamtunit_b talkcommunit_b hab1failtimeunit_e hab1successtimeunit_e hab2failtimeunit_e hab2successtimeunit_e sleepstreet4wamtunit_e saveusewhenunit_e  train1timeunit_e train2timeunit_e trainbiztimeunit_e sleepstreet2wamtunit_e bigtriplsttimeunit_e relmeetunit_e{
			qui ds `var', has(type string)
			foreach var in `r(varlist)' {
				replace `var'="1" if `var'=="Day" | `var'== "1-Day"  | `var'=="1- DAY"                        | `var'=="1-Days"  | `var'=="1-DAYS"    |  `var'=="1- DAYS" | `var'== "1-days" | `var' =="1-day"
				replace `var'="2" if `var'=="Week" | `var'=="2-Week" | `var'=="2- WEEK"     | `var'=="2-WEEK" | `var'=="3-Weeks"  | `var'=="2-WEEKS" | `var'=="2- WEEKS" | `var'== "2-weeks" | `var'== "2-week"
				replace `var'="3" if `var'=="Month" | `var'=="3-Month" |  `var'=="3- MONTH"                   | `var'=="2-Months"  | `var'=="3-MONTHS"  | `var'== "3- MONTHS" | `var'== "3-months" | `var' =="3-month" | `var' =="month"
				replace `var'="4" if `var'=="Year" | `var'=="4-Year"  | `var'=="4- YEAR"                      | `var'=="4-Years"  | `var'=="4-YEARS"   | `var'== "4- YEARS" | `var'== "4-years" | `var' =="4-year" | `var' =="year"
				replace `var'="97" if `var'=="5- DON'T KNOW"
				replace `var'="98" if `var'=="6- REFUSES TO ANSWER"
				replace `var'="99" if `var'=="Year" | `var'=="99-Not applicable" |  `var'=="7- N/A"
				destring `var', replace
				la val `var' dwmy
			}
		}

		// round 10 yrs has weeks and motnhs values inverted/

	la def wg_g1f_b 1 "1 Water" 2 "2 Water"
		replace wg_g1f_b = "1" if wg_g1f_b =="1 WATER" | wg_g1f_b =="1 Water"
		replace wg_g1f_b = "2" if wg_g1f_b =="2 WATER" | wg_g1f_b =="3 WATER"
		destring  wg_g1f_b, replace
		la val wg_g1f_b wg_g1f_b

	la def wg_g1g_b 1 "Now" 2 "Wait"
		replace wg_g1g_b = "1" if wg_g1g_b =="NOW =1" | wg_g1g_b =="NOW=1"
		replace wg_g1g_b = "2" if wg_g1g_b =="WAITS =2" | wg_g1g_b =="WAITS=2"
		destring  wg_g1g_b, replace
		la val wg_g1g_b wg_g1g_b

	la def unit 1 "LD" 2 "USD"
		foreach var in  moto4wprofunit_b table4wprofunit_b buysell4wprofunit_b pettytrade4wprofunit_b trade4wprofunit_b office4wprofunit_b carwash4wprofunit_b  carload4wprofunit_b   ///
			carryload4wprofunit_b guard4wprofunit_b  guard4wprofunit_b houseclswp4wprofunit_b scavenge4wprofunit_b   beg4wprofunit_b farm4wprofunit_b    ///
			drugsell4wprofunit_b workoth14wprofunit_b   workoth24wprofunit_b debtothamtunit_b  drugntgrssdamtunit_b debtothamtunit_e   victimhouserob3mamtunit_e ///
			victimtheft3mamtunit_e shopmercvalunit_e tablemercvalunit_e buysellmercvalunit_e trademercvalunit_e   officemercvalunit_e carloadmercvalunit_e   ///
			carwashmercvalunit_e   motomercvalunit_e   carryloadmercvalunit_e guardmercvalunit_e houseclswpmercvalunit_e scavengemercvalunit_e    ///
			farmmercvalunit_e workoth1mercvalunit_e   workoth2mercvalunit_e   ///
			ptrneveramtunit_b ptrn4wamtunit_b durcutlassetc2wunit_e durmattressetc2wunit_e durelectronics2wunit_e durfurniture2wunit_e durlights2wunit_e durland2wunit_e bizotheramtunit_e biztransportamtunit_e bizcorruptionamtunit_e bizemployeesamtunit_e bizsectyamtunit_e bizfeesamtunit_e bizstructamtunit_e shop2winventoryamtunit_e shop2wequipmentamtunit_e shop2wmaterialsamtunit_e shop2wbizstructamtunit_e table2winventoryamtunit_e  ///
			table2wequipmentamtunit_e table2wmaterialsamtunit_e table2wbizstructamtunit_e buysell2winventoryamtunit_e buysell2wequipmentamtunit_e buysell2wmaterialsamtunit_e  ///
			buysell2wbizstructamtunit_e pettytrade2winventoryamtunit_e pettytrade2wequipmentamtunit_e pettytrade2wmaterialsamtunit_e pettytrade2wbizstructamtunit_e  ///
			trade2winventoryamtunit_e trade2wequipmentamtunit_e trade2wmaterialsamtunit_e trade2wbizstructamtunit_e office2winventoryamtunit_e office2wequipmentamtunit_e  ///
			office2wmaterialsamtunit_e office2wbizstructamtunit_e carload2winventoryamtunit_e carload2wequipmentamtunit_e carload2wmaterialsamtunit_e carload2wbizstructamtunit_e  ///
			carwash2winventoryamtunit_e carwash2wequipmentamtunit_e carwash2wmaterialsamtunit_e carwash2wbizstructamtunit_e moto2winventoryamtunit_e moto2wequipmentamtunit_e  ///
			moto2wmaterialsamtunit_e moto2wbizstructamtunit_e carryload2winventoryamtunit_e carryload2wequipmentamtunit_e carryload2wmaterialsamtunit_e carryload2wbizstructamtunit_e  ///
			guard2winventoryamtunit_e guard2wequipmentamtunit_e guard2wmaterialsamtunit_e guard2wbizstructamtunit_e houseclswp2winventoryamtunit_e houseclswp2wequipmentamtunit_e  ///
			houseclswp2wmaterialsamtunit_e houseclswp2wbizstructamtunit_e scavenge2winventoryamtunit_e scavenge2wequipmentamtunit_e scavenge2wmaterialsamtunit_e  ///
			scavenge2wbizstructamtunit_e beg2winventoryamtunit_e beg2wequipmentamtunit_e beg2wmaterialsamtunit_e beg2wbizstructamtunit_e farm2winventoryamtunit_e  ///
			farm2wequipmentamtunit_e farm2wmaterialsamtunit_e farm2wbizstructamtunit_e drugsell2winventoryamtunit_e drugsell2wequipmentamtunit_e drugsell2wmaterialsamtunit_e  ///
			drugsell2wbizstructamtunit_e workoth12winventoryamtunit_e workoth12wequipmentamtunit_e workoth12wmaterialsamtunit_e workoth12wbizstructamtunit_e  ///
			workoth22winventoryamtunit_e workoth22wequipmentamtunit_e workoth22wmaterialsamtunit_e workoth22wbizstructamtunit_e  carload1dcashunit_b carload7dcashunit_b ///
			cellcredit7damtunit_e  durbikeetc2wunit_e shop2winventoryamtunit_e shop2wequipmentamtunit_e  prostitution7dunit_b drugs7dunit_b marijuana7dunit_b cigarette7dunit_b  ///
			videoclub7dunit_b  payphone7dunit_b phonecharge7dunit_b  cellcredit7damtunit_b cookoil7dunit_b coal7dunit_b transport7dunit_b med7dunit_b drinkalcohol7dunit_b  ///
			drinksoft7dunit_b drinkwater7dunit_b  smallfood7dunit_b victimhouserob6mamtunit_b drugntgrss7damtunit_b druggrassdamtunit_b  drinkboozedamtunit_b debtamtunit_b   ///
			savingsamtunit_b clean4wcashunit_b clean7dcashunit_b clean1dcashunit_b cook4wcashunit_b cook7dcashunit_b cook1dcashunit_b scavenge7dcashunit_b  ///
			scavenge1dcashunit_b beg7dcashunit_b beg1dcashunit_b farm4wcashunit_b farm7dcashunit_b farm1dcashunit_b brush4wcashunit_b  ///
			brush7dcashunit_b brush1dcashunit_b drugsell4wcashunit_b drugsell7dcashunit_b drugsell1dcashunit_b workoth17dcashunit_b workoth11dcashunit_b  ///
			workoth27dcashunit_b workoth21dcashunit_b workoth14wcashunit_b workoth24wcashunit_b guard7dcashunit_b guard1dcashunit_b  ///
			carryload7dcashunit_b carryload1dcashunit_b moto7dcashunit_b moto1dcashunit_b  carwash7dcashunit_b carwash1dcashunit_b  ///
			pettytrade7dcashunit_b pettytrade1dcashunit_b buysell7dcashunit_b ptrncomdr4wamtunit_b  ptrndrugsell4wamtunit_b  trade1dcashunit_b trade7dcashunit_b buysell1dcashunit_b ///
			ptrndrugselleveramtunit_b  shop4wcashunit_b  table4wcashunit_b buysell4wcashunit_b pettytrade4wcashunit_b trade4wcashunit_b carload4wcashunit_b  carwash4wcashunit_b  ///
			moto4wcashunit_b carryload4wcashunit_b   guard4wcashunit_b  houseclswp4wcashunit_b    scavenge4wcashunit_b   beg4wcashunit_b   farm4wcashunit_b  ///
			drugsell4wcashunit_b   workoth14wcashunit_b  workoth24wcashunit_b cash4wunit_b save4wunit_b cash7dunit_b ///
			save7dunit_b  savesusuamtunit_b saveclubamtunit_b    drinkbeerwinexamtunit_b  drinkginxamtunit_b  drugntgrss4wamtunit_b rentunit_b gamble7damtunit_b steallastsellunit_b voteregrecruitedpdamtunit_b  savebankamtunit_b  ///
			savewpersonamtunit_b savewselfamtunit_b saveothamtunit_b  debtfamunit_b  debtfriendsunit_b   debtmnylendunit_b debtsavclubunit_b    debtsusuunit_b debtbnkmicrofunit_b ///
			ptrncomdreveramtunit_b ptrnblkmkt4wamtunit_b ptrnblkmkteveramtunit_b  office4wcashunit_b grantgavetounlucky1amtunit_e grantrecdfromlucky1amtunit_e grantboughtfirstamtunit_e ///
			grantuse1amtunit_e grantuse2amtunit_e grantuse3amtunit_e grantunusedamtunit_e grantpaiddebtamtunit_e grantpaidrentamtunit_e  victimhouserob4wamtunit_e victimtheft4wamtunit_e ///
			inventoryamtunit_e inventory7damtunit_e materialsamtunit_e equipmentamtunit_e equipmentothamtunit_e bizrentamtunit_e bizrent1mcostunit_e bizstorageamtunit_e voteregrecruitedpdamtunit_e ///
			steallastsellunit_e cosmetics4wamtunit_e med4wamtunit_e gamble7damtunit_e schlfeeself4wunit_e schlfeeself3munit_e jewelry4wamtunit_e shoes4wamtunit_e clothes4wamtunit_e drugtablet4wamtunit_e  ///
			drinkboozedamtunit_e drughard4wamtunit_e debtpd4wunit_e debtnew4wunit_e saveuseamtunit_e shop4wcashunit_e shopmercsvalunit_e table4wcashunit_e buysell4wcashunit_e pettytrade7dcashunit_e ///
			pettytrade4wcashunit_e trade4wcashunit_e office4wcashunit_e carload4wcashunit_e carwash4wcashunit_e moto4wcashunit_e carryload4wcashunit_e  guard4wcashunit_e houseclswp4wcashunit_e ///
			scavenge4wcashunit_e beg4wcashunit_e farm4wcashunit_e drugsell4wcashunit_e workoth14wcashunit_e workoth24wcashunit_e cash4wunit_e save4wunit_e cashgiftrecd4wunit_e schlfeechild3m1unit_e schlfeechild3m2unit_e ///
			schlfeepartner3m1unit_e schlfeepartner3m2unit_e schlfeeothers3m1unit_e schlfeeothers3m2unit_e childsprt7dunit_e partnersprt7dunit_e partnergifts7dunit_e cashgiftgiven7dunit_e grantrecdfromlucky2amtunit_e grantgavetounlucky2amtunit_e ///
			handoutcashunit_e ptrn4wamtunit_e ptrneveramtunit_e cash7dunit_e save7dunit_e cashprev7dunit_e saveprev7dunit_e cashgiftrecd2wunit_e schlfeechild6munit_e                    ///
			schlfeechild2wunit_e schlfeepartner6munit_e schlfeepartner2wunit_e schlfeeothers6munit_e schlfeeothers2wunit_e childsprt2wunit_e partnersprt2wunit_e partnergifts2wunit_e            ///
			cashgiftgiven2wunit_e savesusuamtunit_e saveclubamtunit_e savebankamtunit_e savewpersonamtunit_e savewselfamtunit_e saveothamtunit_e debtfamunit_e debtfriendsunit_e debtmnylendunit_e   ///
			debtsavclubunit_e debtsusuunit_e debtbnkmicrofunit_e debtpd2wunit_e debtnew2wunit_e rentunit_e clothes2wamtunit_e shoes2wamtunit_e jewelry2wamtunit_e cellcredit2wamtunit_e               ///
			cosmetics2wamtunit_e med2wamtunit_e gamble2wamtunit_e schlfeeself2wunit_e schlfeeself6munit_e shop7dcashunit_e shopprev7dcashunit_e shop7dprofunit_e            ///
			shopequipvalunit_e shoprawmatvalunit_e shopstructvalunit_e table7dcashunit_e tableprev7dcashunit_e table7dprofunit_e tableprev7dprofunit_e tablemercsvalunit_e                 ///
			tableequipvalunit_e tablerawmatvalunit_e tablestructvalunit_e buysell7dcashunit_e buysellprev7dcashunit_e buysell7dprofunit_e buysellprev7dprofunit_e buysellmercsvalunit_e    ///
			buysellequipvalunit_e buysellrawmatvalunit_e buysellstructvalunit_e pettytradeprev7dcashunit_e pettytrade7dprofunit_e pettytradeprev7dprofunit_e pettytrademercsvalunit_e      ///
			pettytradeequipvalunit_e pettytraderawmatvalunit_e pettytradestructvalunit_e trade7dcashunit_e tradeprev7dcashunit_e trade7dprofunit_e tradeprev7dprofunit_e trademercsvalunit_e  ///
			tradeequipvalunit_e traderawmatvalunit_e tradestructvalunit_e office7dcashunit_e officeprev7dcashunit_e office7dprofunit_e officeprev7dprofunit_e officemercsvalunit_e officeequipvalunit_e ///
			officerawmatvalunit_e officestructvalunit_e carload7dcashunit_e carloadprev7dcashunit_e carload7dprofunit_e carloadprev7dprofunit_e carloadmercsvalunit_e                ///
			carloadequipvalunit_e carloadrawmatvalunit_e carloadstructvalunit_e carwash7dcashunit_e carwashprev7dcashunit_e carwash7dprofunit_e carwashprev7dprofunit_e carwashmercsvalunit_e     ///
			carwashequipvalunit_e carwashrawmatvalunit_e carwashstructvalunit_e motoprev7dcashunit_e moto7dcashunit_e moto7dprofunit_e motoprev7dprofunit_e motomercsvalunit_e motoequipvalunit_e   ///
			motorawmatvalunit_e motostructvalunit_e carryload7dcashunit_e carryloadprev7dcashunit_e carryload7dprofunit_e carryloadprev7dprofunit_e carryloadmercsvalunit_e                      ///
			carryloadequipvalunit_e carryloadrawmatvalunit_e carryloadstructvalunit_e guard7dcashunit_e guardprev7dcashunit_e guard7dprofunit_e guardprev7dprofunit_e guardmercsvalunit_e  ///
			guardequipvalunit_e guardrawmatvalunit_e guardstructvalunit_e houseclswp7dcashunit_e houseclswpprev7dcashunit_e houseclswp7dprofunit_e houseclswpprev7dprofunit_e  ///
			houseclswpmercsvalunit_e houseclswpequipvalunit_e houseclswprawmatvalunit_e houseclswpstructvalunit_e scavenge7dcashunit_e scavengeprev7dcashunit_e scavenge7dprofunit_e  ///
			scavengeprev7dprofunit_e scavengemercsvalunit_e scavengeequipvalunit_e scavengerawmatvalunit_e scavengestructvalunit_e beg7dcashunit_e begprev7dcashunit_e beg7dprofunit_e  ///
			begprev7dprofunit_e begmercsvalunit_e begequipvalunit_e begrawmatvalunit_e begstructvalunit_e farm7dcashunit_e farmprev7dcashunit_e farm7dprofunit_e farmprev7dprofunit_e farmmercsvalunit_e  ///
			farmequipvalunit_e  shop4wprofunit_b  farmrawmatvalunit_e farmstructvalunit_e drugsell7dcashunit_e drugsellprev7dcashunit_e drugsell7dprofunit_e drugsellprev7dprofunit_e drugsellmercsvalunit_e  ///
			drugsellequipvalunit_e drugsellrawmatvalunit_e drugsellstructvalunit_e workoth17dcashunit_e workoth1prev7dcashunit_e workoth17dprofunit_e workoth1prev7dprofunit_e   ///
			workoth1mercsvalunit_e  workoth1equipvalunit_e workoth1rawmatvalunit_e workoth1structvalunit_e workoth27dcashunit_e workoth2prev7dcashunit_e workoth27dprofunit_e shopprev7dprofunit_e  ///
			workoth2prev7dprofunit_e votepaymaterials2wamtunit_e votepayreg2wamtunit_e druggrassdamtunit_e drinkboozedamtunit_e workoth2mercsvalunit_e workoth2equipvalunit_e drugntgrssdamtunit_e workoth2rawmatvalunit_e workoth2structvalunit_e cash7dunit_e save7dunit_e cashprev7dunit_e saveprev7dunit_e {
				qui ds `var', has(type string)
				foreach var in `r(varlist)' {
					replace `var'="1" if `var'=="LD" | `var'== "1- LD" | `var'== "1-LD"  | `var'=="1-ld"
					replace `var'="2" if `var'=="USD" | `var'== "2- USD" | `var'=="2-USD" | `var'=="2-usd"
					replace `var'="99" if `var'=="99-Not applicable" | `var'== "3- NOT APPLICABLE" | `var'== "3- NOT APPLICABLE" | `var'=="3- Not applicable"
					destring `var', replace
					la val `var' unit
				}
		}

	la def yesno 1 "Yes" 0 "No"
		foreach x in vote2005prezr1_b adddrugntgrsscantstop_b crsee2011xriot_e crowedmoney_e  crjoin2011xjobpro_e crother2011xriot_e  crblamegovt_e  crblamecdc_e crblameyouth_e    crjoinhypriot_e   crjoin2011xriot_e     ///
			crcaught2011xriot_e  crjoin2011xriotself_e   crmoblize2011xriot_e  crcaught2011xriot_e idv_savesusu_e idv_drugntgrss_e idv_hhlivetogether_e  idv_hhhead_e   ///
			idv_blsvyinvite_e idv_lottotpletter_e  idv_lottogrntinvite_e idv_abelcard_e   digtest2_1v3_e digtest2_2v3_e digtest3_1v3_e   digtest3_2v3_e   digtest4_1v3_e     ///
			digtest4_2v3_e digtest5_1v3_e digtest6_1v3_e   digtest6_2v3_e   digtest5_2v3_e   digtest7_1v3_e   digtest7_2v3_e  digtest8_1v3_e  digtest8_2v3_e digtest9_1v3_e    ///
			digtest9_2v3_e   digopptest2_1v3_e   digopptest2_3v3_e   digopptest2_4v3_e   digopptest3_2v3_e   digopptest4_1v3_e   digopptest4_2v3_e   digopptest6_2v3_e     ///
			digopptest8_1v3_e  digopptest7_1v3_e    digopptest8_2v3_e   digopptest7_2v3_e  digopptest5_1v3_e   digopptest6_1v3_e  digopptest5_2v3_e  digopptest3_1v3_e     ///
			digopptest2_2v3_e   idv_lottogrntletter_e    idv_selfdrinkgin_e   idv_bornlib_e   time_decl_finishtasks_e   lottotpwin_e lottotpcolorchip_e     ///
			victimhouserob3m_e victimtheft3m_e threatlife3m_e physattack3m_e  risk_decl_guineabuygoods_e loan100pay110_b  drinkboozeevday_b addboozesick_b druggrasstea_b    ///
			vote2005prezr2_b  vo2011octvote_b   vo2011novvote_b voregrecruitedpd_b voattendrally_b vopaidrally_b   vojoindemst_b   voassociationmeetings_b   pvpeerjoinloot_b   ///
			pvjoinloot_b pvpeerjoindestroy_b  pvjoindestroy_b pvpeerjoinintimidate_b   pvjoinintimidate_b   pvpeertalkloot_b  pvtalkloot_b   pvpeerjoinlootpaid_b   pvjoinlootpaid_b  ///
			pvinfodec2011riot_b pvpeerdec2011riot_b   pvjoindec2011riot_b   pvhypdemstpaid_b   pvhyppalpaid200ld_b pvhyppalpaid_b   pvhypdemstpaidwcheat_b  pvhyppalpaidwcheat_b  ///
			pvhyppalpaid200ldwcheat_b   loan100pay110_e     time_decl_waitexam1w_b risk_decl_dangerfun_b voassociationmeetings_e vojoindemst_e     ///
			vopaidrally_e voattendrally_e  voregrecruitedpd_e   vo2011novvote_e  vo2011octvote_e  pv2011willingfight_e  pv2011cdcmorepal_e    pvhypboycott_e  pv2011ellencheat_e   ///
			pvhyppalpaid25usd_e   pvhyppalpaid100usd_e pvhyppalpaid50usd_e pvtalkloot_e  pvjoinlootpaid_e   pvpeerjoinlootpaid_e    pvpeertalkloot_e   pvjoinintimidate_e    ///
			pvpeerjoinintimidate_e  pvjoindestroy_e   pvpeerjoindestroy_e  pvjoinloot_e   pvpeerjoinloot_e   cvseevjgroup6m_e cvjoinvjgroup6m_e cvhypvjgroup_e  cvjoindemstpc6m_e    ///
			cvhypvjviolator_e  cvjoinvjviolator6m_e  cvseevjviolator6m_e   cvhypvjrogue_e cvjoinvjrogue6m_e  cvhypdemstpc_e cvseedemstpc6m_e  cvhypdemstvi_e cvseevjrogue6m_e    ///
			cvjoindemstvi6m_e cvseedemstvi6m_e attstblackmoney_e  pvhypdemstpaid_e  pvhyppalpaid_e  pvhyppalpaid200ld_e pvhyppalpaid300ld_e pvhypdemstpaidwcheat_e pvhyppalpaidwcheat_e pvhyppalpaidwcheat_e   ///
			pvhyppalpaid200ldwcheat_e pvhyppalpaid300ldwcheat_e   nvstrangerrob_e nvowetakesthg_e nvknowncriminal_e nvstorekeeperpunish_e nvkillstorekeeperpunish_e nvbeatwoman_e nvdestroyproperty_e nvstealfriendsgirl_e   ///
			nvcorruptleaderbeaten_e nvbeatwife_e nvgirlrape_e  repcomm_e   jobcomm_e relcomm_e fightwarunit_e peerpalava_b lottogrntanysmallhelp_e lottogrntinfl_e lottogrntcrrptn_e    ///  ///
			lottotpanysmallhelp_e  lottotpselectwithoutwin_e peerburglary_e ///
			lottogrntfair_e  lottotpnoselectpreventwin_e lottotpnoselectdrawagain_e   lottotpnoselectseesmall_e  lottotpnoselectothhelp_e  lottotpselectinfl_e  ///
			peerrobbers_e peergamble_e peerexcom_e peercomdr_e peershare_e peersmallpal_e peerbigpal_e peercheer_e peerschool_e peercommmtg_e peerchurch_e peerwork_e peerbeg_e  ///
			peerbusiness_e peerdrunk_e peerdrugs_e peersave_e peertrust_e stealplancontinue_b tempt2a_b tempt3a_b tempt1a_b  gambleever_b  peeradvice_b  ///
			idv_schoolin_e  idv_selfdrugsell_e stylidcheck_e gcontact_e g10b_e  druggrasstea_e  grantgavetounlucky2_e grantwonslfrpt_e  tpcounseltrust_e hhlivealone_b   ///
			physattack6m_b  threatlife6m_b victimhouserob6m_b  carrytradprotect_b ordinaryattacked_b  safecomm_b sleepstreet12m_b   drugsellfriends_b drugsever_b  ///
			drugntgrssfriends_b druggrassfriends_b drinkboozeself_b schoolbasin_b stealtempted_b  mrefusesexok_b mownopinionok_b  mhit_b   ///
			stealmuggerever_b steal_b g9d_e  g9b_e g9c_e  hupeerpickpocket_e stealweapon_b gdrama_b gsport_b gsusu_b gyouth_b gschool_b ///
			gtown_b grel_b gcoop_b gbus_b goth_b glead_b leader_b bigman_b cando_b quarrelsome_b groupstart_b mrelationscondoms_b mbeatok_b mwithholdfundsok_b ///
			minsult_b mthreat_b  maccuse_b  mmoney_b  mgift_b cclcomplet_b wg_cclwater_b  digtestpractice_b  digtest2_1v1_b  digtest3_1v1_b  digtest3_2v1_b  ///
			digtest4_2v1_b  digtest5_1v1_b  digtest5_2v1_b  digtest6_1v1_b  digtest6_2v1_b  digtest7_1v1_b  digtest8_1v1_b  digopptestpractice_b  digopptest2_1v1_b  ///
			digopptest3_2v1_b  digopptest4_1v1_b  digopptest4_2v1_b  digopptest5_1v1_b  digopptest5_2v1_b  digopptest6_1v1_b  digopptest6_2v1_b  uviol_b savewperson_b ///
			saveclub_b savebank_b debts_b debtpayback_b savewself_b  startbizever_b drugsellever_b ownbizever_b drugsell4w_b brush4w_b cook4w_b ///
			time_decl_finishtasks_b ownadult_b disabled_b regret_b faction_b  aliveage40_b aliveage45_b aliveage50_b aliveage55_b aliveage60_b aliveage65_b aliveage70_b ///
			aliveage75_b aliveage80_b aliveage85_b aliveage90_b aliveage95_b aliveage100_b 	clean4w_b  	digopptest3_1v1_b digtest4_1v1_b savesusu_b ///
			risk_decl_motorcyclenight_b loan50_b loan300_b loanld_b bullets_b attackcutlass_b beat_b kill_b battles_b beating_b battleinj_b uviol_b  thoughtdie_b refugee_b ///
			displaced_b everfighter_b druggrassself_b 	adddrugntgrsstoler_b drugsellself_b sleepsafe_b  ptrncmdrblkmktdrugsell_b truthful_b ///
			drinkbeerwineself_b drinkginself_b  addboozecantstop_b druggrassevday_b adddruggrasstoler_b adddruggrasscantstop_b drugntgrssself_b drugntgrssevday_b  ///
			moneysafe_b  foodsafe_b bussafe_b  othersafe_b fightwarunit_b relcomm_b jobcomm_b  repcomm_b hupeerscam_b  hupeermugger_b hupeerarmedrob_b ///
			stealtakethings4w_b  stealmistakecorr4w_b  stealscrape4w_b voteregrecruitedpd_b votereg_b mentcap_b  over18_b gcontact_b hupeerpickpocket_b ///
			stealpickpocket4w_b  stealscam4w_b  stealblackdeed4w_b  stealmugger4w_b stealarmedrob4w_b stealweapon_b	voteplanreg_b voteregrecruited_b   ///
			g2a_b g2b_b g3m1b_b g3m1d_b g3m2b_b g3m2d_b g3m3b_b g3m3d_b g5a_b g5b_b g5c_b g5g1d_b g5g2d_b g5g3d_b g5g4d_b g5g5d_b g9b_b g9a_b g9c_b g9d_b g10a_b g10b_b  ///
			drinktoday_b eattoday_b sdtaste_b ageknow_b monrovia_b bornlib_b   train1_b  train2_b train2in_b trainbiz_b trainbizin_b ptrnjob_b ///
			ptrnbiz_b ptrnfood_b ptrnschl_b ptrnhsing_b ptrncmder_b ptrnblkmkt_b ptrncmdrblkmkt_b ptrndrugsell_b ptrncmdrdrugsell_b ptrncmdrblkmkt2_b  ///
			time_decl_waitexam2dys_b time_decl_waitexam3dys_b time_decl_waitexam1dys_b risk_decl_guineabuygoods_b warname_b farmever_b  ///
			shop4w_b table4w_b buysell4w_b pettytrade4w_b office4w_b trade4w_b carload4w_b carwash4w_b moto4w_b carryload4w_b guard4w_b houseclswp4w_b scavenge4w_b  ///
			beg4w_b farm4w_b drugsell4w_b workoth14w_b workoth24w_b scavenge4w2_b beg4w2_b farm4w2_b drugsell4w2_b workoth14w2_b workoth24w2_b shopever_b ///
			shop4w2_b table4w2_b buysell4w2_b pettytrade4w2_b office4w2_b trade4w2_b carload4w2_b carwash4w2_b moto4w2_b carryload4w2_b guard4w2_b houseclswp4w2_b  ///
			tableever_b buysellever_b pettytradeever_b tradeever_b officeever_b motoever_b savesusu_b saveclub_b savebank_b savewperson_b savewself_b saveoth_b  ///
			sleepstreet4w_b sleepstreetnow_b ownhouse_b threatlife4w_b  physattack4w_b fearattack_b fearpeople_b train1in_b hhheadlive_b dependent_b ///
			peerguard_b peerguard_e peercheer_b peerbigpal_b peersmallpal_b peershare_b peercomdr_b peerexcom_b peergamble_b peerrobbers_b peerburglary_b  ///
			peerpickpocket_b  peertrust_b peersave_b peerdrugs_b peerdrunk_b peerbusiness_b peerbeg_b peerwork_b peerchurch_b peercommmtg_b peerschool_b ///
			gamble_b stealsurvive_b  fine4w_b groupcommleader_b  policestation4w_b  carryweapon_b mmarried_b  mmarriedlive_b mgirlfriend_b  mgirlfriendlive_b   ///
			mpartnersbelly_b digopptest2_1v2_b  digopptest2_2v2_b digopptest2_3v2_b stealscrape2w_e ///
			hhlivetogether_b hhhead_b interested_b hearconsent_b g1a_b digtest2_1v2_b digtest2_2v2_b digtest3_1v2_b digtest3_2v2_b digtest4_1v2_b digtest4_2v2_b  ///
			digtest5_1v2_b digtest5_2v2_b digtest6_1v2_b digtest6_2v2_b digtest7_1v2_b digtest7_2v2_b digtest8_1v2_b digtest8_2v2_b digtest9_1v2_b digtest9_2v2_b  ///
			digopptest2_4v2_b digopptest3_1v2_b digopptest3_2v2_b digopptest4_1v2_b digopptest4_2v2_b digopptest5_1v2_b digopptest5_2v2_b digopptest6_1v2_b  ///
			digopptest6_2v2_b digopptest7_1v2_b digopptest7_2v2_b digopptest8_1v2_b digopptest8_2v2_b grantpaiddebt_e  digtest6_2v1_e   digopptest5_2v1_e   ///
			g2a_e g2b_e g3m1b_e g3m1d_e g3m2b_e g3m2d_e g3m3b_e g3m3d_e  g10a_e tpcheck_e tpattended_e tpencourage_e tpandbossman_e granttell_e grantrecdfromlucky1_e  ///
			grantrecdworried_e grantrecdtold_e grantputwherewhy1_e grantboughtfirst_e grantuse1savedwhy1_e grantuse2savedwhy1_e grantuse3savedwhy1_e grantharrass_e  ///
			grantpaidrent_e  g1a_e digtest2_1v1_e  digtest3_1v1_e  digtest3_2v1_e  digtest4_1v1_e  digtest4_2v1_e  digtest5_1v1_e  digtest5_2v1_e  digtest6_1v1_e   ///
			digtest7_1v1_e  digtest8_1v1_e  digopptest2_1v1_e  digopptest3_1v1_e  digopptest3_2v1_e  digopptest4_1v1_e  digopptest4_2v1_e  digopptest5_1v1_e  ///
			digopptest6_1v1_e  digopptest6_2v1_e digtest2_1v2_e digtest2_2v2_e digtest3_1v2_e digtest3_2v2_e digtest4_1v2_e digtest4_2v2_e digtest5_1v2_e digtest5_2v2_e  ///
			digtest6_1v2_e digtest6_2v2_e digtest7_1v2_e digtest7_2v2_e digtest8_1v2_e digtest8_2v2_e digtest9_1v2_e digtest9_2v2_e digopptest2_1v2_e digopptest2_2v2_e  ///
			digopptest2_3v2_e digopptest2_4v2_e digopptest3_1v2_e digopptest3_2v2_e digopptest4_1v2_e digopptest4_2v2_e digopptest5_1v2_e digopptest5_2v2_e  ///
			digopptest6_2v2_e digopptest7_1v2_e digopptest7_2v2_e digopptest8_1v2_e digopptest8_2v2_e digopptest6_1v2_e stealtakethings2w_e stealmistakecorr2w_e  ///
			hab1try_e hab2try_e icgo500_e icgo1000_e icplansfight_e icplansfight_e  ictribebelong_e ictribefight_e icconftalk_e icpeoplegone_e ictalktogo_e  ///
			icpromisemoney_e icgo250_e icgoborder_e icmeeting_e icmeetinggo_e icselfmoney_e icselfmoneyreceive_e icwillingfight_e ictribe_e sleepstreet4w_e victimhouserob4w_e  ///
			victimtheft4w_e threatlife4w_e physattack4w_e mownopinionok_e mrefusesexok_e mwithholdfundsok_e mbeatok_e mrelationscondoms_e mgiftcondom_e mmoneycondom_e  mmarried_e  ///
			mmarriedlive_e mgirlfriend_e mgirlfriendlive_e mpartnersbelly_e fine4w_e policestation4w_e  voteplanreg_e voteregrecruited_e voteregrecruitedpd_e  votereg_e  ///
			stealtakethings4w_e stealmistakecorr4w_e stealscrape4w_e stealpickpocket4w_e stealscam4w_e stealblackdeed4w_e stealmugger4w_e stealarmedrob4w_e med4w_e cosmetics4w_e  ///
			clothes4w_e shoes4w_e jewelry4w_e  fearattack_e fearpeople_e drugtablet_e drughard_e drugsellself_e adddrugntgrsssick_e drinkboozeself_e grantrecdfromlucky2_e  ///
			workoth22w2_e office4w2_e shop4w_e shop4w2_e table4w_e table4w2_e buysell4w_e buysell4w2_e pettytrade4w_e pettytrade4w2_e trade4w_e trade4w2_e office4w_e carload4w_e  ///
			carload4w2_e carwash4w_e carwash4w2_e moto4w_e  moto4w2_e carryload4w_e carryload4w2_e guard4w_e guard4w2_e houseclswp4w_e houseclswp4w2_e scavenge4w_e scavenge4w2_e  ///
			beg4w_e beg4w2_e farm4w_e farm4w2_e drugsell4w_e drugsell4w2_e workoth14w_e workoth14w2_e workoth24w_e workoth24w2_e sleepstreet2w_e hearconsent_e train2_e ptrnfood_e  ///
			time_decl_waitexam2dys_e time_decl_waitexam1dys_e time_decl_waitexam1w_e ptrnblkmkt_e ptrncmder_e ptrndrugsell_e ptrnhsing_e ptrnschl_e ptrnbiz_e ptrnjob_e trainbiz_e  ///
			trainbizin_e train2in_e train1_e school_e schoolin_e sdtaste_e eattoday_e drinktoday_e foodckshp_e foodhvyoth3d_e clothes2w_e shoes2w_e jewelry2w_e cosmetics2w_e  ///
			med2w_e stealsurvive_e votepayreg_e votepartyshirt_e voteattendrally_e votepaidrally_e  commmeet_e commchangeplan_e  ///
			voteencourage_e voteassociationmemer_e voteassociationmeetings_e votepaymaterials_e groupcommleader_e leader_e bigman_e groupstart_e serious_e cando_e  ///
			commintendtostay_e warname_e vote2005prezr1_e commoneyear_e volcommittee_e hearconsent_e lottotpplay_e  lottotpnocmpsn_e  ///
			lottotpnoselectletterkeep_e lottotpfair_e lottotpcrrptn_e lottotpnoselectletter_e lottotpnoselectwithwin_e lottotpselect_e lottotpselectletterkeep_e lottotpselectletter_e  ///
			lottotpselectnoplaycmpsn_e lottotpselectothhelp_e lottotpselectseesmall_e lottotpselectdrawagain_e lottotpselectswitch_e lottotpsuccess_e carryweapon_e hhhead_e workoth12w_e  ///
			carryload2w2_e druggrassevday_e  adddrugntgrsscantstop_e drugsellself_e  ///
			shop2w_e table2w_e buysell2w_e pettytrade2w_e ownhouse_e trade2w_e office2w_e carload2w_e carwash2w_e moto2w_e  shop2w2_e table2w2_e buysell2w2_e  ///
			pettytrade2w2_e trade2w2_e office2w2_e carload2w2_e carwash2w2_e moto2w2_e   carryload2w_e guard2w_e houseclswp2w_e scavenge2w_e farm2w_e beg2w_e drugsell2w_e  ///
			carryload2w2_e guard2w2_e houseclswp2w2_e vote2005prezr2_e train1in_e vote2011prezreg_e vote2011prezplanvote_e vote2011prezlocation_e foodckshpoth3d_e  ///
			sleepstreetnow_e scavenge2w2_e farm2w2_e beg2w2_e drugsell2w2_e workoth12w2_e workoth22w_e saveclub_e savesusu_e  savebank_e savewperson_e savewself_e saveoth_e ///
			loan50_e loan50pay4m_e loan300_e loan300pay1y_e loanld_e drinkboozeself_e drinkboozeevday_e addboozecantstop_e addboozesick_e druggrassself_e  ///
			adddruggrasstoler_e adddruggrasscantstop_e adddruggrasssick_e drugntgrssself_e risk_decl_motorcyclenight_e drugntgrssevday_e adddrugntgrsstoler_e  ///
			sleepsafe_e moneysafe_e foodsafe_e bussafe_e othersafe_e   risk_decl_dangerfun_e lottotpinfl_e peerpickpocket_e hupeerscam_e hupeermugger_e hupeerarmedrob_e ///
			stealpickpocket2w_e stealscam2w_e stealblackdeed2w_e stealmugger2w_e stealarmedrob2w_e stealweapon_e mentcap_e  worryrobhome_e worryrobyou_e  ///
			worrythreatlife_e worryphysattack_e {
				qui ds `x', has(type string)
				foreach var in `r(varlist)' {
					replace `var'="1" if `var'=="Y" | `var' =="1-Yes" | `var' =="1- YES" | `var' =="YES=1" | `var' =="1-YES"  | `var' =="1- YES " | `var' =="1- Yes" | `var' =="Yes" | `var' =="1-yes" | `var' =="1-yes "
					replace `var'="0" if `var'=="N" | `var'==" N" | `var' =="0-No" | `var' =="0-no" | `var' =="0-No5" | `var'=="No" | `var' =="0-no" | `var' =="90-No" | `var' =="N0" | `var' =="4-No, other reason" | `var' =="2-No, intoxicated, drunk or high"
					replace `var' = "98" if `var'=="98-Refuse to answer" | `var' =="98-refuse to answer" | `var' =="98N" | `var' =="-888-Refuse to answer" | `var' =="-888-Refuse"
					replace `var' = "97" if `var' =="97-Don't know" | `var'=="Y N" | `var' =="-999-Don't know"
					replace `var' = "99" if `var' =="99-Missing"| `var' =="99-Not applicable" | `var' =="99-Didn't have affairs" | `var'=="99-No, because I didn't win" | `var'=="99-No because I didn't win"
					destring `var', replace
					la val `var' yesno
				}
		}


// DESTRING ALL OTHER VARIABLES
	*tpcounselwho_e_1 tpcounselwho_e_3 tpcounselwho_e_4



/*
take out multiple answer choices.

ccldistract_e_1 ccldistract_e_2 ccldistract_e_3 ccldistract_e_4
handoutstuff_e_1 handoutstuff_e_2 handoutstuff_e_3
handouttrain_e_1 handouttrain_e_2 handouttrain_e_3
 drugntgrssspecify_e_1 drugntgrssspecify_e_2 drugntgrssspecify_e_3 drugntgrssspecify_e_5 drugntgrssspecify_e_7 drugntgrssspecify_e_6
stealweaponspecify_e_1 stealweaponspecify_e_2 stealweaponspecify_e_3 stealweaponspecify_e_4
mainactivity_e

*/


	foreach var in schoolbaslevel_b  schoolbasstop_b  schoollevel_e idv_schoollevel_e idv_schoolstop_e alive10yr_b alive5yr_b alive1yr_b alive1mo_b ///
	    alive1wk_b   drugntgrssspecify_b_1 drugntgrssspecify_b_2 drugntgrssspecify_b_3   ///
		drugntgrssspecify_b_4 drugntgrssspecify_b_5 drugntgrssspecify_b_6 drugntgrssspecify_b_7 drugntgrssspecify_b_8 drugntgrssspecify_b_9 drugntgrssfriendsspecify_b_1  ///
		drugntgrssfriendsspecify_b_2 drugntgrssfriendsspecify_b_3 drugntgrssfriendsspecify_b_4 drugntgrssfriendsspecify_b_5 drugntgrssfriendsspecify_b_6   ///
		drugntgrssfriendsspecify_b_7 drugseverspecify_b_1 drugseverspecify_b_2 drugseverspecify_b_3 drugseverspecify_b_4 drugsellfriendsspecify_b_1   ///
		drugsellfriendsspecify_b_2 drugsellfriendsspecify_b_3 drugsellfriendsspecify_b_4 drugsellfriendsspecify_b_5 drugsellfriendsspecify_b_6 drugsellfriendsspecify_b_7   ///
		drugsellselfspecify_b_1 drugsellselfspecify_b_2 drugsellselfspecify_b_3 drugsellselfspecify_b_4 drugsellselfspecify_b_5 drugsellselfspecify_b_6 tempt1b_b_1   ///
		tempt1b_b_2 tempt1b_b_3 tempt1b_b_4 tempt1b_b_5 tempt2b_b_1 tempt2b_b_2 tempt2b_b_3 tempt3b_b_1 tempt3b_b_2 tempt3b_b_3 tempt3b_b_4 stealweaponspecify_b_1   ///
		stealweaponspecify_b_2 stealweaponspecify_b_3 stealweaponspecify_b_4 stealweaponspecify_b_5 stealweaponspecify_b_7 stealweaponspecify_b_6 stealweaponspecify_b_8   ///
		steallastwhat_b_1 steallastwhat_b_2 steallastwhat_b_3 steallastwhat_b_4 steallastwhat_b_5 steallastwhat_b_6 steallastwhat_b_7 steallastwhat_b_8 stealhow_b_1   ///
		stealhow_b_2 ccldistract_b_1 ccldistract_b_2 ccldistract_b_3 ccldistract_b_4 granttellwho_e_1 granttellwho_e_2 granttellwho_e_3 granttellwho_e_4 granttellwho_e_5   ///
		granttellwho_e_7 lottotpdes_e_1 lottotpdes_e_2 lottotpdes_e_4 lottotpdes_e_5 lottotpdes_e_6 lottotpdes_e_7 tpabsences_e_1 tpabsences_e_2 grantrecdtoldwho_e_1 grantrecdtoldwho_e_2 ///
		grantrecdtoldwho_e_3 grantrecdtoldwho_e_4 drugtabletspecify_e_1 drugtabletspecify_e_2 drughardspecify_e_1   ///
		drughardspecify_e_2 drughardspecify_e_3  steallastwhat_e_1    ///  votepaidrallyparty_e_1 votepaidrallyparty_e_2
		steallastwhat_e_2 steallastwhat_e_3 carryweaponkind_e_1 carryweaponkind_e_2  icconfhear_e_1 icconfhear_e_2 icconfhear_e_3 icconfhear_e_4 icconfhear_e_5   ///
		vote2011knowcandidates_e_1 vote2011knowcandidates_e_2 vote2011knowcandidates_e_3 vote2011knowcandidates_e_4 disabledspecify_b_1 disabledspecify_b_2 idv_tribe_e   ///
		cclunderstand_e  g9ev3_e g9fv3_e   g9gv3_e   g9hv3_e    g9iv3_e     g9jv3_e  g10cv2_e g10dv2_e g10ev2_e g10fv2_e g12v1_e  gpayout_e   cclwillshare_e   ///
		idv_borncty_e   crrighyouth_e  idv_borncntry_e  idv_dadedu_e  savefor_e loan100pay110for_e pvpeerjoinlootpaidparty_b   pvjoinlootpaidparty_b     ///
		lvg1monrovia_e cclwillshare_b   time_hyp_mnygm1v2_e   time_hyp_mnygm2v2_e time_hyp_mnygm3v2_e   time_hyp_mnygm4v2_e time_hyp_mnygm5v2_e   ///
		time_hyp_mnygm6v2_e risk_hyp_mnygm7v2_e  risk_hyp_mnygm9v2_e time_decl_troublestarting_e  time_decl_impulsebuy_e   time_hyp_avdmnywstingfrnds_e     ///
		time_hyp_avdthvngfrnds_e   risk_decl_20vs100lotto_e   time_wait1wfor3mcntrct_e  time_decl_spendquick_e   time_decl_selfdiscipline_e     ///
		time_wait1wfor2mcntrct_e  time_wait2wfor2mcntrct_e time_wait3wfor2mcntrct_e   time_wait2wfor1ndhlfmcntrct_e  time_decl_resisting_e   ///
		risk_hyp_mnygm10v2_e  lvg1notmonsize_e   suspicious_e   lvg1notmoncty_e   lvg1permres_e   hearconsent2_e   lvg2monrovia_e   tplostearnings_e   ///
		tprecommend_e peidwhere_e lvg2notmonsize_e dg_candychoice_e   lvg2notmoncty_e dg_hungry_e  causeconfusion_b vopaidrallyparty_b     ///
		vo2011octvoteparty_b  voattendrallyparty_b vo2011novvoteparty_b vote2005prezr2spec_b  adddruggrasssick_b  druggrassmuch_b  buysell4wowner_b     ///
		pettytrade4wowner_b   trade4wspecify_b   trade4wowner_b  office4wowner_b   carload4wowner_b carwash4wowner_b   moto4wowner_b guard4wowner_b   ///
		scavenge4wowner_b houseclswp4wowner_b beg4wowner_b farm4wowner_b   drugsell4wowner_b workoth14wowner_b workoth24wowner_b savefor_b     ///
		loan100pay110for_b textwar2_b addboozetoler_b   famquarrel_b cclvisiblyangry_b  vote2005prezr1spec_b    grantcheck2_e     ///
		grantputwhere_e grantharrasswho_e hupeerwhat_e   sleeptheft_e  cclvisiblyangry_e    ///
		table4wowner_b  shop4wowner_b time_hyp_mnygm6_b time_hyp_mnygm2_b time_hyp_mnygm1_b time_hyp_mnygm3_b train2course_b train1course_b lvg2notmoncty_b  lvg2notmonsize_b lvg2monrovia_b    ///
		  lvg1permres_b  lvg1notmoncty_b lvg1notmonsize_b lvg1monrovia_b risk_decl_20vs100lotto_b time_hyp_mnygm4_b time_hyp_mnygm5_b hhcomposition_b hhcheck2_b hupeerwhat_b carrytradprotectkind_b   ///
		druggrassselfmarijuana_b druggrassfriendsspecify_b loanldwho_b  ///
		time_decl_impulsebuy_b time_decl_troublestarting_b stealhustle_b sdchoosecheck_b  sdchoosecheck_e tribe_b borncty_b borncntry_b relchrist_b sdflavor_b   sdbottle_b  ///
		sdchoose_b rel_b risk_decl_keepjob250vs50_b risk_decl_20surevs100lotto_b mainactivity_b schoolentexam_e risk_decl_keepjob250vs50_e   commchangewhy_e  neighborhood_b  ///
		trainbizcourse_b schoolbasuniv_b time_decl_umbrellas_b time_decl_medicine_b time_wait1wfor3mcntrct_b  time_wait1wfor2mcntrct_b  time_wait2wfor2mcntrct_b  ///
		time_wait3wfor2mcntrct_b time_wait2wfor1ndhlfmcntrct_b hhcomposition_e carryweaponhowoften_e   fexcoms_e  fexcoms_b   ///
		risk_decl_surgerychoice_b risk_decl_plentyprofit_b risk_decl_keepjob200vs75_b fexcoms_b momedu_b dadedu_b drinkgin3dunit_b drinkplmwine3dunit_b landtownunit_b  ///
		steallastfrmwho_b   sdthirsty_b   carryweaponhowoften_b carryweapondaynight_b  ictalktogowho_e ictribespecify_e  icpresident_e   icconfcause_e  ///
		steallastfrmwho_e drinkboozemuch_e  sdthirsty_e time_decl_umbrellas_e neighborhood_e sdflavor_e time_decl_medicine_e  ///
		time_hyp_mnygm1_e time_hyp_mnygm2_e time_hyp_mnygm3_e time_hyp_mnygm4_e time_hyp_mnygm5_e time_hyp_mnygm6_e ///
		 risk_decl_keepjob200vs75_e risk_decl_surgerychoice_e  risk_decl_plentyprofit_e    ///
		 trainbizcourse_e  carryweapondaynight_e  lottotpplaycheck_e lottotphow_e sdchoose_e  ladder10yrago_e ladder5yrago_e ///
		sdbottle_e   lottotppaperwinlose_e  lottotpselectcmpsn_e watersource_e  landtownunit_e  drinkgin3dunit_e drinkplmwine3dunit_e  ///
		pettytrade4wowner_e floor_e  floor_b sleepdry_e  sleepdry_b roof_e roof_b ownbed_e  ownbed_b walls_e walls_b  dwelling_e  ///
		dwelling_b bathe_e bathe_b watersource_e watersource_b  shoecond_e shoecond_b hair_b hair_e cleanface_b cleanface_e killnum_b  uviolnum_b    train1course_e  ///
		train2course_e  moto4wowner_e carryload4wowner_e guard4wowner_e houseclswp4wowner_e    scavenge4wowner_e beg4wowner_e  farm4wowner_e     drugsell4wowner_e  ///
		workoth14wowner_e workoth24wowner_e carwash4wowner_e carload4wowner_e office4wowner_e  trade4wowner_e pettytrade4wowner_e   buysell4wowner_e shop4wowner_e   ///
		table4wowner_e shop2wowner_e  carload2wowner_e table2wowner_e buysell2wowner_e  pettytrade2wowner_e trade2wowner_e  office2wowner_e carwash2wowner_e moto2wowner_e  ///
		carryload2wowner_e guard2wowner_e houseclswp2wowner_e  scavenge2wowner_e beg2wowner_e farm2wowner_e  drugsell2wowner_e workoth12wowner_e workoth22wowner_e  ///
		time_hyp_100nowvs10x10_b time_hyp_100nowvs10x9_b  time_hyp_100nowvs10x12_b time_hyp_100nowvs10x10_e  time_hyp_100nowvs10x9_e  time_hyp_100nowvs10x12_e  drinkboozedmuch_b  ///
		 troubleneighbors_b druggrassmuch_e drinkboozedmuch_e  drinkbeerwinemuch_b drinkginmuch_b hab1failvsbefore_e  hab2failvsbefore_e  loan50who_b loan300who_b   ///
		hab1tryspecify_e hab2tryspecify_e  hab1trysuccess_e hab2trysuccess_e    hab1trywhy_e hab2trywhy_e  hab1tryfriend_e  hab2tryfriend_e  savesusufor_e saveclubfor_e   ///
		savebankfor_e  savewpersonfor_e  saveothfor_e  savewselffor_e walk_b  carry_b   brushallday_b  savesusufor_b  saveclubfor_b  savebankfor_b savewpersonfor_b  ///
		savewselffor_b  saveothfor_b  risk_hyp_mnygm10_e  risk_hyp_mnygm9_e  risk_hyp_mnygm7_e risk_hyp_mnygm8_e g10e_b g10f_b g10d_b g10c_b  risk_hyp_mnygm10_b  ///
		risk_hyp_mnygm10_b  risk_hyp_mnygm9_b  risk_hyp_mnygm8_b risk_hyp_mnygm7_b g9fv2_e  g9fv3_e g9ev2_e g9jv2_e g9iv2_e g9hv2_e g9gv2_e g9e_b g9f_b  g9a_b g9j_b g9i_b g9h_b g9g_b  ///
		g9a_e g9e_e  g9f_e g9g_e g9h_e g9i_e g9j_e g10c_e g10d_e g10e_e g10f_e  breath_b breath_e  clothescond_e clothescond_b  fingernails_b  fingernails_e toilet_e toilet_b  ///
		payrent_e  payrent_b  cnsc_prepare_b cnsc_details_b cnsc_doitright_b cnsc_plans_b cnsc_work_b cnsc_getby_b cnsc_complete_b cnsc_shirk_b  nrtc_relax_b nrtc_sad_b   ///
		nrtc_bother_b nrtc_worry_b nrtc_threaten_b nrtc_offend_b nrtc_stress_b nrtc_disturb_b	 lc_choicesfuture_b lc_nocontrol_b lc_bizluck_b lc_tryhard_b lc_planswork_b  ///
		lc_badluck_b lc_peoplestreets_b  lc_success_b se_satisfied_b se_useless_b  se_fail_b se_respect_b se_goodperson_b se_good4nothing_b se_bizwell_b se_notproud_b    ///
		prsv_overcome_b prsv_ambitious_b prsv_discourage_b prsv_changeplan_b prsv_achieveimp_b prsv_achievenoimp_b  prsv_driven_b bas_goallout_b bas_noholds_b  bas_doforfun_b  ///
		bas_keepatit_b bas_feelexcite_b bas_seeopp_b bas_feelstrongly_b bas_wincontest_b  cnsc_prepare_e  cnsc_details_e cnsc_doitright_e cnsc_plans_e cnsc_work_e cnsc_getby_e  ///
		cnsc_complete_e cnsc_shirk_e nrtc_relax_e nrtc_sad_e nrtc_bother_e  nrtc_worry_e    nrtc_threaten_e nrtc_offend_e nrtc_stress_e nrtc_disturb_e prsv_overcome_e  ///
		prsv_changeplan_e prsv_achieveimp_e  prsv_achievenoimp_e prsv_driven_e    bas_goallout_e bas_noholds_e bas_doforfun_e bas_keepatit_e bas_feelexcite_e bas_seeopp_e  ///
		bas_feelstrongly_e  bas_wincontest_e lc_choicesfuture_e  lc_nocontrol_e lc_bizluck_e lc_tryhard_e    lc_planswork_e lc_badluck_e lc_peoplestreets_e lc_success_e  ///
		se_satisfied_e se_useless_e se_fail_e se_respect_e  se_goodperson_e se_good4nothing_e  se_bizwell_e se_notproud_e pv2011nov7viblame_e pvpeerjoinlootpaidparty_e  pvjoinlootpaidparty_e ///
		 voteregnowhy_b  voteprezpref_b  vo2011octvoteparty_e voteprezpref_e   voteregnowhy_e  vo2011novvotenowhy_e  vo2011octvotenowhy_e    ///
		 vo2011novvoteparty_e  voattendrallyparty_e vopaidrallyparty_e voteparty_e  voteparty_b votepartypref_e votepartynever_e  ///
		   votestrongprez_e  votemanyparty_e votemilitaryrule_e votebuyvote_e   vote2005prezr1spec_e vote2005prezr2spec_e   /// votepartyid_e votearrvcmny_e
		attstchinamanbeat_e  attstmoneydroptake_e attstfamilylec_e attstroomvaluablestake_e  attstnightops_e  attstmoneybagtake_e   attsttaxiwallet_e  attstmoneyhangtake_e  attselfdrugsell_e  attstknownindiv_e attstifreturn_e   ///
		risk_decl_usedshoes_b cvtalkvjgroup_e   cvtalkvjviolator_e   cvtalkvjrogue_e    cvtalkdemstvi_e cvtalkdemstpc_e pvtalkdemst_e  pvtalkdemstwcheat_e  pvtalkpalwcheat_e   ///
		pvtalkpal_e baddestroy_b hhpalavas_b hhhelpjammed_b hhconcerned_b  hhadvise_b hhshare_b  hhsharefood_b famseeoften_e  famconcern_e famadvise_e  famhelp_e   ///
		stealhowoften_b disobey_b serious_b serious2_b lendhand_b commmeet_b  time_decl_spendquick_b time_decl_selfdiscipline_b   time_decl_resisting_b bimpls_present_b   ///
		bimpls_buy_b bimpls_act_b bimpls_talk_b bimpls_squirm_b bimpls_control_b bimpls_concentrate_b asb_reactlose_b  asb_reacthit_b asb_reactdefend_b  asb_reacttease_b    ///
		asb_proontop_b asb_provandalize_b asb_procompetitor_b asb_prophysforce_b asb_procuss_b 	thinkbad_b baddream_b  badagain_b badbody_b badaway_b baddo_b  badshare_b    ///
		badhappy_b badfuture_b badvex_b badhear_b badscare_b badjump_b badsad_b badtired_b badeat_b badimportant_b badreact_b badadvice_b badtalk_b badspoiled_b   badfrust_b  ///
		badspirit_b baddry_b badsat_b badburn_b hardjokes_b cheat_b troublesome_b selfdiscipline_b frustrated_b  threaten_b takethings_b   famseeoften_b   famadvise_b ///
		 famhelp_b  famtrouble_b time_decl_regretspend_b  time_decl_hidemoney_b    time_hyp_avdmnywstingfrnds_b   time_hyp_avdthvngfrnds_b  time_decl_saveproblems_b  ///
		time_decl_patient_b  risk_decl_worrybizrisk_b 	    risk_decl_gamble_b time_decl_celebrate_b  addboozeprob_b    adddruggrassprob_b  adddrugntgrssprob_b    ///
		friendspeakwar_b friendspeakwar_e	thinkbad_e baddream_e badagain_e badbody_e badaway_e baddo_e  badshare_e badhappy_e badfuture_e   badvex_e badhear_e badscare_e  ///
		badjump_e badsad_e badtired_e badeat_e badimportant_e badreact_e baddestroy_e  badadvice_e badtalk_e badspoiled_e badfrust_e  badspirit_e baddry_e badsat_e   badburn_e  ///
		hardjokes_e cheat_e troublesome_e selfdiscipline_e frustrated_e threaten_e  takethings_e maccuse_e mthreat_e    minsult_e mhit_e time_decl_regretspend_e  ///
		time_decl_hidemoney_e time_decl_celebrate_e time_decl_saveproblems_e  time_decl_patient_e   risk_decl_worrybizrisk_e risk_decl_usedshoes_e risk_decl_gamble_e  ///
		addboozeprob_e   adddruggrassprob_e  adddrugntgrssprob_e bimpls_present_e   bimpls_buy_e bimpls_act_e bimpls_talk_e bimpls_squirm_e bimpls_control_e bimpls_concentrate_e ///
		 asb_reactlose_e  asb_reacthit_e asb_reactdefend_e      asb_reacttease_e asb_proontop_e asb_provandalize_e asb_procompetitor_e asb_prophysforce_e asb_procuss_e   ///
		trade2wspecify_e trade4wspecify_e  sleeptheft_b savesusutype_b  savefreq_b gamblefreq_b savefreq_e savesusutype_e grantuse1_e grantuse2_e grantuse3_e   ///
		grantuse1savedwhy2_e  grantuse2savedwhy2_e grantuse3savedwhy2_e  grantuse1boughtwhy_e grantuse2boughtwhy_e grantuse3boughtwhy_e prsv_ambitious_e prsv_discourage_e  {


		destring `var', replace

		qui ds `var', has(type string)

			foreach var in `r(varlist)' {
			replace `var' ="96-Other" if `var'=="-777-Other" | `var'=="-777-other" | `var'=="7-other" | `var'=="96-other"
			replace `var' ="98-Refuse to answer" if `var' =="-888-Refuse to answer" | `var' =="-888-Refuse"
			replace `var' ="97-Don't know" if `var' =="-999-Don't know"
			replace `var' = ""  if `var'=="." // provisional
			ta `var'
			local lab
			levelsof `var'

         	local i = 1

			foreach level in `r(levels)' {
				gettoken value`i' text : level, parse( "-")
				local text1 = substr("`text'",2,.)
				*di `value`i''

				if `i'>1  {
					local j =1
					while `j' < `i' {
						assert `value`i'' != `value`j''
						local j=`j'+1
					}
				}

				local lab `lab' `value`i'' "`text1'"
				*di `lab'
				local i = `i' + 1
			}

			la def `var' `lab'
			ren `var' `var'_
			egen `var' = ends (`var'_), punct(-) head
			move `var' `var'_
			drop `var'_
			destring `var', replace
			la val `var' `var'
			replace `var'=.o if `var'==96
		}

		else {
			capture replace `var'=.o if `var'==96
		}
	}



// DESTRING NUMERIC VARIABLES

	qui ds , has(type string)
	foreach var in `r(varlist)' {
		destring `var', replace
	}

// SPECIAL CODES

	qui ds , has(type numeric)
	qui foreach var in `r(varlist)' {
		recode `var' (-97 97 =.d) (-98 98 =.r) (-99 99 999 =.)
	}
	recode g2cm_b g2cs_b g2cms_b g3m3c_b g5g3es_b  g5g3em_b g5g2ems_b   g5g3ems_b   (-95 =.)  (-99 =.)

	qui ds , has(type string)
	tab1	`r(varlist)'


mvdecode _all, mv(-999 = .n \ -998 = .n \ -888 = .r \ -777 = .d \ -2997=.)


// DESTRING
 /*
	la def g11_e 1 "Option 1" 10 "Option 10" 11 "Option 11" 12 "Option 12" 2 "Option 2" 3 "Option 3" 4 "Option 4" 5 "Option 5" 6 "Option 6" 7 "Option 7" 8 "Option 8" 9"Option 9"
		foreach var in g11bv2_e g11a_e  {
			ren `var' `var'_
			egen `var' = ends (`var'_), punct(-) head
			move `var' `var'_
			drop `var'_
			destring `var', replace
			la val `var' g11
		}

	* g11_ Fix time game 11 so that coding at baseline and endline is the same

		foreach x in a b {
			replace g11`x'_e=900 if g11`x'_e==1
			replace g11`x'_e=1000 if g11`x'_e==2
			replace g11`x'_e=1050 if g11`x'_e==3
			replace g11`x'_e=1100 if g11`x'_e==4
			replace g11`x'_e=1200 if g11`x'_e==5
			replace g11`x'_e=1300 if g11`x'_e==6
			replace g11`x'_e=1400 if g11`x'_e==7
			replace g11`x'_e=1500 if g11`x'_e==8
			replace g11`x'_e=1600 if g11`x'_e==9
			replace g11`x'_e=1800 if g11`x'_e==10
			replace g11`x'_e=2000 if g11`x'_e==11
			replace g11`x'_e=3000 if g11`x'_e==12
		}

	destring g11a_b  g11b_b , replace ignore (,)
*/

replace disabled_b = 0 if disabled_b==1 & disabledspecify_b_1 ==0


// additional missing corrections
replace ea7dprof_total_ld_e=.n if ea7dprof_total_ld_e==-499
replace ea7dhours_total_e=.n if ea7dhours_total_e==-3996
replace ea7dhours_worked_1_e=.n if ea7dhours_worked_1_e==-3996
replace fightstotal_e=.n if fightstotal_e==-5994
replace g3m2em_b=.n if g3m2em_b==-95
replace g3m2es_b=.n if g3m2es_b==-95
replace g3m2ems_b=.n if g3m2ems_b==-95
replace ptrneveramt_e=.n if ptrneveramt_e==-996
replace ptrneveramt_ld_e=.n if ptrneveramt_ld_e==-996
replace section14length_b=.n if section14length_b==-1435 | section14length_b==-1431
replace section06length_b=.n if section06length_b==-1415 | section06length_b==-1400 | section06length_b==-205 | section06length_b==-95
replace section03length_b=.n if section03length_b==-710 | section03length_b==-508 | section03length_b==-23
